MFH: disallow $a[] = value syntax

This commit is contained in:
Antony Dovgal 2008-06-07 12:47:04 +00:00
parent b8bd4cbbc6
commit 83d26fc47d

View File

@ -321,6 +321,12 @@ static inline void spl_fastarray_object_write_dimension_helper(spl_fastarray_obj
{
long index;
if (!offset) {
/* '$array[] = value' syntax is not supported */
zend_throw_exception(spl_ce_RuntimeException, "Index invalid or out of range", 0 TSRMLS_CC);
return;
}
index = spl_offset_convert_to_long(offset TSRMLS_CC);
if (index < 0 || index >= intern->array->size) {