Home » Internationalization » I18Nv2 » Bug #5252
Fatal error due to API change in PHP 4.4/5.0.5
Details
| Submitted | 2005-08-31 08:19 UTC |
|---|---|
| From | o dot persson at gmail dot com |
| Assigned | mike |
| Status | Closed |
| Package | I18Nv2 |
| PHP Version | 5.0.5 |
| OS | Debian GNU/Linux |
| Roadmaps | (Not assigned) |
Comments
[2005-08-31 08:19 UTC] o dot persson at gmail dot com
Description:
------------
Just a small fix, couldn't see that it had been fixed in CVS.
Fatal error: Only variables can be passed by reference in /var/www-dev/components/PEAR/I18Nv2/Negotiator.php on line 309
Test script:
---------------
Index: /var/www-dev/components/PEAR/I18Nv2/Negotiator.php
===================================================================
--- /var/www-dev/components/PEAR/I18Nv2/Negotiator.php (revision 55)
+++ /var/www-dev/components/PEAR/I18Nv2/Negotiator.php (working copy)
@@ -306,7 +306,8 @@
if (!$needle) {
return array_shift($haystack);
}
- if ($result = array_shift(array_intersect($haystack, $needle))) {
+ $intersection = array_intersect($haystack, $needle);
+ if ($result = array_shift($intersection)) {
return $result;
}
return $default;