cvs: php-src /ext/standard browscap.c
| From: | Antony Dovgal | Date: | Fri, 29 Aug 2008 14:13:57 +0000 |
| Subject: | cvs: php-src /ext/standard browscap.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-52760@lists.php.net to get a copy of this message | ||
tony2001 Fri Aug 29 14:13:57 2008 UTC
Modified files:
/php-src/ext/standard browscap.c
Log:
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.101&r2=1.102&diff_format=u
Index: php-src/ext/standard/browscap.c
diff -u php-src/ext/standard/browscap.c:1.101 php-src/ext/standard/browscap.c:1.102
--- php-src/ext/standard/browscap.c:1.101 Tue Aug 19 15:16:23 2008
+++ php-src/ext/standard/browscap.c Fri Aug 29 14:13:57 2008
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: browscap.c,v 1.101 2008/08/19 15:16:23 tony2001 Exp $ */
+/* $Id: browscap.c,v 1.102 2008/08/29 14:13:57 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;
}