#5 bugs/typos in qrencode.php
open
nobody
None
5
2012-12-23
2012-12-23
Anonymous
No
some bugs/typos in qrencode.php, QRcode::encodeString8bit, QRcode::png
see attached patch file for details.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
patch file upload failed permanently. here's it's content:
--- qrencode.php Wed Aug 18 07:06:24 2010
+++ qrencode.php Sat Dec 22 18:51:24 2012
@@ -243,7 +243,7 @@
//----------------------------------------------------------------------
public function encodeString8bit($string, $version, $level)
{
- if(string == NULL) {
+ if($string == NULL) {
throw new Exception('empty string!');
return NULL;
}
@@ -251,7 +251,7 @@
$input = new QRinput($version, $level);
if($input == NULL) return NULL;
- $ret = $input->append($input, QR_MODE_8, strlen($string), str_split($string));
+ $ret = $input->append(QR_MODE_8, strlen($string), str_split($string));
if($ret < 0) {
unset($input);
return NULL;
@@ -283,7 +283,7 @@
public static function png($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint=false)
{
$enc = QRencode::factory($level, $size, $margin);
- return $enc->encodePNG($text, $outfile, $saveandprint=false);
+ return $enc->encodePNG($text, $outfile, $saveandprint);
}
//----------------------------------------------------------------------