php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #59808
Patch peclsolr.patch revision 2011-10-13 14:18 UTC by alex at discardmail dot com

Patch peclsolr.patch for solr Bug #59808

Patch version 2011-10-13 14:18 UTC

Return to Bug #59808 | Download this patch
Patch Revisions:

Developer: alex@discardmail.com

--- solr_functions_helpers.c.old	2011-10-13 15:48:59.000000000 +0200
+++ solr_functions_helpers.c.new	2011-10-13 15:50:57.000000000 +0200
@@ -20,7 +20,9 @@
 
 #include "php_solr.h"
 
-ZEND_EXTERN_MODULE_GLOBALS(json)
+#if !(PHP_MAJOR_VERSION==5 && PHP_MINOR_VERSION==2)
+	ZEND_EXTERN_MODULE_GLOBALS(json)
+#endif
 
 /** ************************************************************************ **/
 /** FUNCTIONS FOR DECLARING CONSTANTS                                        **/
@@ -1120,7 +1122,11 @@
 
 	ZVAL_STRINGL(&json_last_error_function_name, "json_last_error", sizeof("json_last_error"), 0);
 
-	php_json_decode(&json_decode_ret_val, (char *) json_string, json_string_length, 1, recursion_depth TSRMLS_CC);
+	#if PHP_MAJOR_VERSION==5 && PHP_MINOR_VERSION==2
+		php_json_decode(&json_decode_ret_val, (char *) json_string, json_string_length, recursion_depth TSRMLS_CC);
+	#elif
+		php_json_decode(&json_decode_ret_val, (char *) json_string, json_string_length, 1, recursion_depth TSRMLS_CC);
+	#endif
 
 	call_user_function(global_function_table, object_pp, &json_last_error_function_name, &json_last_error_ret_val, 0, json_last_error_params TSRMLS_CC);
 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC