SOURCES: php-pear-HTTP-php.patch (NEW) - fixes for php 5.0.5 and n...
arekm
arekm at pld-linux.org
Fri Oct 21 12:24:25 CEST 2005
Author: arekm Date: Fri Oct 21 10:24:24 2005 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- fixes for php 5.0.5 and never
---- Files affected:
SOURCES:
php-pear-HTTP-php.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/php-pear-HTTP-php.patch
diff -u /dev/null SOURCES/php-pear-HTTP-php.patch:1.1
--- /dev/null Fri Oct 21 12:24:24 2005
+++ SOURCES/php-pear-HTTP-php.patch Fri Oct 21 12:24:19 2005
@@ -0,0 +1,40 @@
+diff -urbB HTTP-1.3.6.org/HTTP.php HTTP-1.3.6/HTTP.php
+--- HTTP-1.3.6.org/HTTP.php 2005-05-17 13:03:04.000000000 +0200
++++ HTTP-1.3.6/HTTP.php 2005-10-21 12:21:51.155385664 +0200
+@@ -118,7 +118,8 @@
+ $matches = array();
+ if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
+ foreach (explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']) as $lang) {
+- $lang = array_map('trim', explode(';', $lang));
++ $tmp = explode(';', $lang);
++ $lang = array_map('trim', $tmp);
+ if (isset($lang[1])) {
+ $l = strtolower($lang[0]);
+ $q = (float) str_replace('q=', '', $lang[1]);
+@@ -134,11 +135,14 @@
+
+ if (count($matches)) {
+ asort($matches, SORT_NUMERIC);
+- return $supp[array_pop(array_keys($matches))];
++ $tmp = array_keys($matches);
++ return $supp[array_pop($tmp)];
+ }
+
+ if (isset($_SERVER['REMOTE_HOST'])) {
+- $lang = strtolower(array_pop(explode('.', $_SERVER['REMOTE_HOST'])));
++ $tmp = explode('.', $_SERVER['REMOTE_HOST']);
++ $tmp = array_pop($tmp);
++ $lang = strtolower($tmp);
+ if (isset($supp[$lang])) {
+ return $supp[$lang];
+ }
+@@ -285,7 +289,8 @@
+ return $url;
+ }
+ if (!empty($protocol)) {
+- $url = $protocol .':'. array_pop(explode(':', $url, 2));
++ $tmp = explode(':', $url, 2);
++ $url = $protocol .':'. array_pop($tmp);
+ }
+ if (!empty($port)) {
+ $url = preg_replace('!^(([a-z0-9]+)://[^/:]+)(:[\d]+)?!i',
================================================================
More information about the pld-cvs-commit
mailing list