[php-maint] Bug#618680: Bug#618680: php-image-barcode: Uses depreciated methods

Martin Schulze joey at infodrom.org
Mon Jul 18 10:14:19 UTC 2011


Hi!

Tobias Frost wrote:
> --- alt/Barcode.php	2011-03-17 18:54:24.000000000 +0100
> +++ barcode/Barcode.php	2011-03-17 17:23:02.000000000 +0100
> @@ -77,7 +77,10 @@
>              return PEAR::raiseError("Unable to find draw method in '$classname' class");
>          }
>  
> -        @$obj =& new $classname();
> +        @$obj = new $classname();
>  
>          $img = &$obj->draw($text, $imgtype);
>  
> @@ -107,8 +110,9 @@
>                      break;
>              }
>          } else {
> -            return $img;
> +           $img = null;
>          }
> +	return $img;
>      }
>  }
>  ?>

I wonder if you are aware that this patch effectively results in the
function returning NULL when $bSendToBrowser is set to false (e.g. if
the programmer would like to store the image into a file instead of
sending it to the browser directly).

Regards,

	Joey

-- 
Unix is user friendly ...  It's just picky about its friends.

Please always Cc to me when replying to me on the lists.





More information about the pkg-php-maint mailing list