PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Internationalization » I18Nv2 » Bug #5252

Fatal error due to API change in PHP 4.4/5.0.5

Details

Submitted2005-08-31 08:19 UTC
Fromo dot persson at gmail dot com
Assignedmike
StatusClosed
PackageI18Nv2
PHP Version5.0.5
OSDebian 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;