@@ -287,7 +287,7 @@ static zval *spl_array_get_dimension_ptr(int check_inherited, spl_array_object *
287287 }
288288
289289 if ((type == BP_VAR_W || type == BP_VAR_RW ) && intern -> nApplyCount > 0 ) {
290- zend_error ( E_WARNING , "Modification of ArrayObject during sorting is prohibited" );
290+ zend_throw_error ( NULL , "Modification of ArrayObject during sorting is prohibited" );
291291 return & EG (error_zval );
292292 }
293293
@@ -456,7 +456,7 @@ static void spl_array_write_dimension_ex(int check_inherited, zend_object *objec
456456 }
457457
458458 if (intern -> nApplyCount > 0 ) {
459- zend_error ( E_WARNING , "Modification of ArrayObject during sorting is prohibited" );
459+ zend_throw_error ( NULL , "Modification of ArrayObject during sorting is prohibited" );
460460 return ;
461461 }
462462
@@ -524,7 +524,7 @@ static void spl_array_unset_dimension_ex(int check_inherited, zend_object *objec
524524 }
525525
526526 if (intern -> nApplyCount > 0 ) {
527- zend_error ( E_WARNING , "Modification of ArrayObject during sorting is prohibited" );
527+ zend_throw_error ( NULL , "Modification of ArrayObject during sorting is prohibited" );
528528 return ;
529529 }
530530
@@ -1285,7 +1285,7 @@ PHP_METHOD(ArrayObject, exchangeArray)
12851285 }
12861286
12871287 if (intern -> nApplyCount > 0 ) {
1288- zend_error ( E_WARNING , "Modification of ArrayObject during sorting is prohibited" );
1288+ zend_throw_error ( NULL , "Modification of ArrayObject during sorting is prohibited" );
12891289 return ;
12901290 }
12911291
@@ -1675,7 +1675,7 @@ PHP_METHOD(ArrayObject, unserialize)
16751675 }
16761676
16771677 if (intern -> nApplyCount > 0 ) {
1678- zend_error ( E_WARNING , "Modification of ArrayObject during sorting is prohibited" );
1678+ zend_throw_error ( NULL , "Modification of ArrayObject during sorting is prohibited" );
16791679 return ;
16801680 }
16811681
0 commit comments