Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.1.3

Bug #1986 str_split function problem in code39
Submitted: 2004-07-26 21:21 UTC
From: jason at nothanks dot com Assigned: msmarcal
Status: Closed Package: Image_Barcode
PHP Version: 0.5 OS: linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 49 + 36 = ?

 
 [2004-07-26 21:21 UTC] jason at nothanks dot com
Description: ------------ The str_split is already in php5, so it pulls an error when you try to create a code39 barcode. Here's a quick fix: if(!function_exists('str_split')){ function str_split( $str, $num = '1' ) { if($num < 1) return FALSE; $arr = array(); for ($j = 0; $j < strlen($str); $j= $j+$num) { $arr[] = substr($str,$j,$num); } return $arr; }} Reproduce code: --------------- . Expected result: ---------------- . Actual result: -------------- .

Comments

 [2004-10-14 08:07 UTC] scragz at hotmail dot com
PEAR's PHP_Compat can declare this function as well, which is how I ran into the conflict.
 [2005-04-11 21:09 UTC] jason at unleashed dot com dot br
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/Image_Barcode Fixed in release 1.0.0