return NULL;
}
- index = spl_offset_convert_to_long(offset TSRMLS_CC);
+ if (Z_TYPE_P(offset) != IS_LONG) {
+ index = spl_offset_convert_to_long(offset TSRMLS_CC);
+ } else {
+ index = Z_LVAL_P(offset);
+ }
if (index < 0 || intern->array == NULL || index >= intern->array->size) {
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 (Z_TYPE_P(offset) != IS_LONG) {
+ index = spl_offset_convert_to_long(offset TSRMLS_CC);
+ } else {
+ index = Z_LVAL_P(offset);
+ }
if (index < 0 || intern->array == NULL || index >= intern->array->size) {
zend_throw_exception(spl_ce_RuntimeException, "Index invalid or out of range", 0 TSRMLS_CC);
{
long index;
- index = spl_offset_convert_to_long(offset TSRMLS_CC);
+ if (Z_TYPE_P(offset) != IS_LONG) {
+ index = spl_offset_convert_to_long(offset TSRMLS_CC);
+ } else {
+ index = Z_LVAL_P(offset);
+ }
if (index < 0 || intern->array == NULL || index >= intern->array->size) {
zend_throw_exception(spl_ce_RuntimeException, "Index invalid or out of range", 0 TSRMLS_CC);
long index;
int retval;
- index = spl_offset_convert_to_long(offset TSRMLS_CC);
+ if (Z_TYPE_P(offset) != IS_LONG) {
+ index = spl_offset_convert_to_long(offset TSRMLS_CC);
+ } else {
+ index = Z_LVAL_P(offset);
+ }
if (index < 0 || intern->array == NULL || index >= intern->array->size) {
retval = 0;
intern = (spl_fixedarray_object *)zend_object_store_get_object(return_value TSRMLS_CC);
intern->array = array;
}
+/* }}} */
/* {{{ proto int SplFixedArray::getSize(void)
*/