Vote Details for "JpegMarkerReader" by gauthierm

» Details
  • Voter: Michael Gauthier 
  • Vote: +1 (not conditional)
  • Reviews: Cursory source review
» Comment
Good explanation on the mailing list. Perhaps it should be added verbatim to the package description.

Code will likely break if mb_string overloading is turned on due to use of strlen(). It will also likely be broken for PHP6. I recommend creating a private _strlen() method that checks for the presence of mb_string(), and optionally uses binary casting to support PHP6.


function _strlen($string)
if ((ini_get('mb_string_overload') & 2) == 2) {
$len = mb_strlen($string, '8bit');
} else {
$len = strlen((binary)$string);
return $len;