@@ -162,11 +162,9 @@ static inline void arraylist_object_write_dimension_helper(arraylist_object *int
162162
163163 if (Z_TYPE_P (offset ) != IS_LONG ) {
164164 convert_to_long (offset );
165- index = Z_LVAL_P (offset );
166- } else {
167- index = Z_LVAL_P (offset );
168- }
169-
165+ }
166+ index = Z_LVAL_P (offset );
167+
170168 if (index < 0 || index >= intern -> array .nSize ) {
171169 php_error_docref (NULL , E_NOTICE , "Index invalid or out of range %ld" , index );
172170 return ;
@@ -217,10 +215,8 @@ static inline zval *arraylist_object_read_dimension_helper(arraylist_object *int
217215
218216 if (Z_TYPE_P (offset ) != IS_LONG ) {
219217 convert_to_long (offset );
220- index = Z_LVAL_P (offset );
221- } else {
222- index = Z_LVAL_P (offset );
223- }
218+ }
219+ index = Z_LVAL_P (offset );
224220
225221 if (index < 0 || index >= intern -> array .nSize ) {
226222 php_error_docref (NULL , E_NOTICE ,"Index invalid or out of range %ld" , index );
@@ -339,10 +335,8 @@ static inline int arraylist_object_has_dimension_helper(arraylist_object *intern
339335
340336 if (Z_TYPE_P (offset ) != IS_LONG ) {
341337 convert_to_long (offset );
342- index = Z_LVAL_P (offset );
343- } else {
344- index = Z_LVAL_P (offset );
345- }
338+ }
339+ index = Z_LVAL_P (offset );
346340
347341 if (index < 0 || index >= intern -> array .nSize ) {
348342 retval = 0 ;
@@ -370,11 +364,9 @@ static inline void arraylist_object_unset_dimension_helper(arraylist_object *int
370364
371365 if (Z_TYPE_P (offset ) != IS_LONG ) {
372366 convert_to_long (offset );
373- index = Z_LVAL_P (offset );
374- } else {
375- index = Z_LVAL_P (offset );
376367 }
377-
368+ index = Z_LVAL_P (offset );
369+
378370 if (index < 0 || index >= intern -> array .nSize ) {
379371 php_error_docref (NULL , E_NOTICE ,"Index invalid or out of range '%ld'" , index );
380372 return ;
0 commit comments