cvs: php-src(PHP_5_3) /ext/standard browscap.c
| From: | Antony Dovgal | Date: | Fri, 29 Aug 2008 14:14:09 +0000 |
| Subject: | cvs: php-src(PHP_5_3) /ext/standard browscap.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-52761@lists.php.net to get a copy of this message | ||
tony2001 Fri Aug 29 14:14:09 2008 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/standard browscap.c
Log:
MFH: fix get_browser() (broken in the process of param API conversion)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/browscap.c?r1=1.85.2.2.2.3.2.8&r2=1.85.2.2.2.3.2.9&diff_format=u
Index: php-src/ext/standard/browscap.c
diff -u php-src/ext/standard/browscap.c:1.85.2.2.2.3.2.8
php-src/ext/standard/browscap.c:1.85.2.2.2.3.2.9
--- php-src/ext/standard/browscap.c:1.85.2.2.2.3.2.8 Tue Aug 19 15:16:33 2008
+++ php-src/ext/standard/browscap.c Fri Aug 29 14:14:09 2008
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: browscap.c,v 1.85.2.2.2.3.2.8 2008/08/19 15:16:33 tony2001 Exp $ */
+/* $Id: browscap.c,v 1.85.2.2.2.3.2.9 2008/08/29 14:14:09 tony2001 Exp $ */
#include "php.h"
#include "php_browscap.h"
@@ -328,7 +328,7 @@
char *agent_name = NULL;
int agent_name_len;
zend_bool return_array = 0;
- zval **agent;
+ zval **agent, **z_agent_name;
zval *found_browser_entry, *tmp_copy;
char *lookup_browser_name;
char *browscap = INI_STR("browscap");
@@ -375,8 +375,8 @@
zend_hash_copy(Z_OBJPROP_P(return_value), Z_ARRVAL_PP(agent), (copy_ctor_func_t) zval_add_ref,
(void *) &tmp_copy, sizeof(zval *));
}
- while (zend_hash_find(Z_ARRVAL_PP(agent), "parent", sizeof("parent"), (void
**) &agent_name) == SUCCESS) {
- if (zend_hash_find(&browser_hash, agent_name, agent_name_len + 1, (void **)&agent) ==
FAILURE) {
+ while (zend_hash_find(Z_ARRVAL_PP(agent), "parent", sizeof("parent"), (void
**) &z_agent_name) == SUCCESS) {
+ if (zend_hash_find(&browser_hash, Z_STRVAL_PP(z_agent_name), Z_STRLEN_PP(z_agent_name) + 1,
(void **)&agent) == FAILURE) {
break;
}