Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patrickallaert/1004203 to your computer and use it in GitHub Desktop.
Save patrickallaert/1004203 to your computer and use it in GitHub Desktop.
Notice on array to string conversion
diff --git a/Zend/zend.c b/Zend/zend.c
index 07bdf98..bcc52f1 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -247,6 +247,7 @@ ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_cop
Z_STRLEN_P(expr_copy) = sprintf(Z_STRVAL_P(expr_copy), "Resource id #%ld", Z_LVAL_P(expr));
break;
case IS_ARRAY:
+ zend_error(E_NOTICE, "Array to string conversion");
Z_STRLEN_P(expr_copy) = sizeof("Array") - 1;
Z_STRVAL_P(expr_copy) = estrndup("Array", Z_STRLEN_P(expr_copy));
break;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment