Home » Text » Text_Diff » Bug #5152
Inline checking fails in versions earlier than 4.3.0
Details
| Submitted | 2005-08-19 11:58 UTC |
|---|---|
| From | kruegel at gmail dot com |
| Assigned | yunosh |
| Status | Closed |
| Package | Text_Diff |
| PHP Version | 4.2.0 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2005-08-19 11: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");