summaryrefslogtreecommitdiff
path: root/ext/spl/spl_fixedarray.c
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2009-05-23 15:14:15 (GMT)
committerFelipe Pena <felipe@php.net>2009-05-23 15:14:15 (GMT)
commit941ac63eeff2642f890649a89a1b9fa9f81abec9 (patch)
tree9758bddb91210279fa5e1507468c82b52a3fd51e /ext/spl/spl_fixedarray.c
parentbe7d45b0dccd2ebbf3ed1677725633da98caaac2 (diff)
downloadphp-941ac63eeff2642f890649a89a1b9fa9f81abec9.tar.gz
- MFH: Added missing param checks
Diffstat (limited to 'ext/spl/spl_fixedarray.c')
-rw-r--r--ext/spl/spl_fixedarray.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c
index ca19cdb..2337682 100644
--- a/ext/spl/spl_fixedarray.c
+++ b/ext/spl/spl_fixedarray.c
@@ -912,6 +912,10 @@ static void spl_fixedarray_it_move_forward(zend_object_iterator *iter TSRMLS_DC)
SPL_METHOD(SplFixedArray, key)
{
spl_fixedarray_object *intern = (spl_fixedarray_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
RETURN_LONG(intern->current);
}
@@ -922,6 +926,10 @@ SPL_METHOD(SplFixedArray, key)
SPL_METHOD(SplFixedArray, next)
{
spl_fixedarray_object *intern = (spl_fixedarray_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
intern->current++;
}
@@ -932,6 +940,10 @@ SPL_METHOD(SplFixedArray, next)
SPL_METHOD(SplFixedArray, valid)
{
spl_fixedarray_object *intern = (spl_fixedarray_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
RETURN_BOOL(intern->current >= 0 && intern->array && intern->current < intern->array->size);
}
@@ -942,6 +954,10 @@ SPL_METHOD(SplFixedArray, valid)
SPL_METHOD(SplFixedArray, rewind)
{
spl_fixedarray_object *intern = (spl_fixedarray_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
intern->current = 0;
}
@@ -953,7 +969,10 @@ SPL_METHOD(SplFixedArray, current)
{
zval *zindex, **value_pp;
spl_fixedarray_object *intern = (spl_fixedarray_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
-
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
ALLOC_INIT_ZVAL(zindex);
ZVAL_LONG(zindex, intern->current);