Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Applying patch from #60361 to improve Solr debug handling

  • Loading branch information...
commit dcf128dfb4614cbc5a3fae975720625cbeb1c5b1 1 parent babc02d
@ecaron authored
View
11 config.m4
@@ -3,12 +3,11 @@ dnl $Id: config.m4 298824 2010-04-30 21:36:26Z iekpo $
dnl config.m4 for the solr extension
-AC_ARG_ENABLE(solr-debug,
-[ --enable-solr-debug Compile with solr in verbose mode],[
- AC_DEFINE(SOLR_DEBUG, 1, [Setting the value of SOLR_DEBUG to 1 ])
-],[
- AC_DEFINE(SOLR_DEBUG_OFF, 1, [Setting the value of SOLR_DEBUG_OFF to 1 ])
-])
+PHP_ARG_ENABLE(solr-debug, whether to compile with solr in verbose mode,
+[ --enable-solr-debug Compile with solr in verbose mode], no, no)
+if test "$PHP_SOLR_DEBUG" != "no"; then
+ AC_DEFINE(SOLR_DEBUG, 1, [Defining SOLR_DEBUG])
+fi
dnl Configuring the CURL external library
dnl This folder is the grand-parent folder of easy.h
View
8 config.w32
@@ -32,10 +32,8 @@ if(PHP_LIBXML == 'no' || !ADD_EXTENSION_DEP('solr', 'libxml')) {
PHP_SOLR = "no";
}
if(PHP_SOLR != 'no') {
- if(PHP_SOLR_DEBUG == 'no') {
- AC_DEFINE('SOLR_DEBUG_OFF', 1, 'Solr debugging set to off');
- } else {
- AC_DEFINE('SOLR_DEBUG', 1, 'Solr debugging set to on');
+ if(PHP_SOLR_DEBUG != 'no') {
+ AC_DEFINE('SOLR_DEBUG', 1, 'Defining SOLR_DEBUG');
}
EXTENSION('solr',
@@ -49,7 +47,7 @@ if(PHP_SOLR != 'no') {
ADD_FLAG('CFLAGS_SOLR', '/D CURL_STATICLIB /D LIBXML_STATICLIB');
AC_DEFINE('HAVE_SOLR', 1, 'Solr support');
- if (!PHP_SOLR_SHARED) {
+ if(!PHP_SOLR_SHARED) {
ADD_FLAG("CFLAGS_SOLR", "/D LIBXML_STATIC");
}
ADD_EXTENSION_DEP('solr', 'libxml');
View
2  solr_functions_helpers.c
@@ -20,7 +20,7 @@
#include "php_solr.h"
-#if !(PHP_MAJOR_VERSION==5 && PHP_MINOR_VERSION==2)
+#if ((PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION > 2)) || (PHP_MAJOR_VERSION > 5)
ZEND_EXTERN_MODULE_GLOBALS(json)
#endif
View
6 solr_functions_params.c
@@ -1048,7 +1048,7 @@ PHP_SOLR_API int solr_delete_normal_param_value(zval *objptr, solr_char_t *pname
{
zend_hash_del(params_ht, pname, pname_length);
-#if SOLR_DEBUG
+#ifdef SOLR_DEBUG
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Deleted last value from parameter. Removing parameter '%s' from object instance.", pname);
#endif
@@ -1109,7 +1109,7 @@ PHP_SOLR_API int solr_delete_simple_list_param_value(zval *objptr, solr_char_t *
{
zend_hash_del(params_ht, pname, pname_length);
-#if SOLR_DEBUG
+#ifdef SOLR_DEBUG
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Deleted last value from parameter. Removing parameter '%s' from object instance.", pname);
#endif
@@ -1170,7 +1170,7 @@ PHP_SOLR_API int solr_delete_arg_list_param_value(zval *objptr, solr_char_t *pna
{
zend_hash_del(params_ht, pname, pname_length);
-#if SOLR_DEBUG
+#ifdef SOLR_DEBUG
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Deleted last value from parameter. Removing parameter '%s' from object instance.", pname);
#endif
Please sign in to comment.
Something went wrong with that request. Please try again.