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

Bug #5152 Inline checking fails in versions earlier than 4.3.0
Submitted: 2005-08-19 06:58 UTC Modified: 2006-12-17 11:10 UTC
From: kruegel at gmail dot com Assigned: yunosh
Status: Closed Package: Text_Diff
PHP Version: 4.2.0 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2005-08-19 06:58 UTC] kruegel at gmail dot com
Description: ------------ Text\Diff\Renderer\inline.php The following lines fail in php versions earlier than 4.3.0 due to the use of the "start position" parameter in the strspn and strcspn functions. $spaces = strspn($string, " \n", $pos); $nextpos = strcspn($string, "\n", $pos + spaces); The listed dependency for Text_Diff is currently 4.2.0 The following replacement can be made in order to allow it to work in these earlier versions: $spaces = strspn(substr($string, $pos), " \n"); $nextpos = strcspn(substr($string, $pos + $spaces), " \n");

Comments

 [2005-08-19 07:17 UTC] yunosh
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/Text_Diff Thanks for the analysis and suggestion.