@@ -287,7 +287,7 @@ static zval *spl_array_get_dimension_ptr(int check_inherited, spl_array_object *
287
287
}
288
288
289
289
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" );
291
291
return & EG (error_zval );
292
292
}
293
293
@@ -456,7 +456,7 @@ static void spl_array_write_dimension_ex(int check_inherited, zend_object *objec
456
456
}
457
457
458
458
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" );
460
460
return ;
461
461
}
462
462
@@ -524,7 +524,7 @@ static void spl_array_unset_dimension_ex(int check_inherited, zend_object *objec
524
524
}
525
525
526
526
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" );
528
528
return ;
529
529
}
530
530
@@ -1285,7 +1285,7 @@ PHP_METHOD(ArrayObject, exchangeArray)
1285
1285
}
1286
1286
1287
1287
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" );
1289
1289
return ;
1290
1290
}
1291
1291
@@ -1675,7 +1675,7 @@ PHP_METHOD(ArrayObject, unserialize)
1675
1675
}
1676
1676
1677
1677
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" );
1679
1679
return ;
1680
1680
}
1681
1681
0 commit comments