]> granicus.if.org Git - php/commitdiff
- Add warnings
authorAndi Gutmans <andi@php.net>
Mon, 10 Apr 2000 19:54:45 +0000 (19:54 +0000)
committerAndi Gutmans <andi@php.net>
Mon, 10 Apr 2000 19:54:45 +0000 (19:54 +0000)
Zend/zend_execute.c

index a96db60de32a8d0c1cea6dee1bda723e524e2ab4..675b641012268fe5c73f781d63872542210ea935 100644 (file)
@@ -712,6 +712,7 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
                        *retval = &EG(uninitialized_zval_ptr);
                        SELECTIVE_PZVAL_LOCK(**retval, result);
                        FREE_OP(op2, free_op2);
+                       zend_error(E_WARNING, "Cannot use a NULL value as an array");
                        break;
                case IS_STRING: {
                                zval *offset;
@@ -753,6 +754,7 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
                                }
                                FREE_OP(op2, free_op2);
                                SELECTIVE_PZVAL_LOCK(**retval, result);
+                               zend_error(E_WARNING, "Cannot use a scalar value as an array");
                        }
                        break;
        }