|
|
|
@ -816,6 +816,7 @@ SPL_METHOD(SplDoublyLinkedList, offsetSet) |
|
|
|
index = spl_offset_convert_to_long(zindex TSRMLS_CC); |
|
|
|
|
|
|
|
if (index < 0 || index >= intern->llist->count) { |
|
|
|
zval_ptr_dtor(&value); |
|
|
|
zend_throw_exception(spl_ce_OutOfRangeException, "Offset invalid or out of range", 0 TSRMLS_CC); |
|
|
|
return; |
|
|
|
} |
|
|
|
@ -838,6 +839,7 @@ SPL_METHOD(SplDoublyLinkedList, offsetSet) |
|
|
|
intern->llist->ctor(element TSRMLS_CC); |
|
|
|
} |
|
|
|
} else { |
|
|
|
zval_ptr_dtor(&value); |
|
|
|
zend_throw_exception(spl_ce_OutOfRangeException, "Offset invalid", 0 TSRMLS_CC); |
|
|
|
return; |
|
|
|
} |
|
|
|
|