Skip to content

Commit 7e89864

Browse files
committed
MFH: return FALSE
1 parent 24f66fb commit 7e89864

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ext/standard/image.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,25 +574,28 @@ PHP_FUNCTION(getimagesize)
574574

575575
case 1:
576576
if (zend_get_parameters_ex(1, &arg1) == FAILURE) {
577+
RETVAL_FALSE;
577578
WRONG_PARAM_COUNT;
578579
}
579580
convert_to_string_ex(arg1);
580581
break;
581582

582583
case 2:
583584
if (zend_get_parameters_ex(2, &arg1, &info) == FAILURE) {
585+
RETVAL_FALSE;
584586
WRONG_PARAM_COUNT;
585587
}
586588
zval_dtor(*info);
587589

588590
if (array_init(*info) == FAILURE) {
589-
return;
591+
RETURN_FALSE;
590592
}
591593

592594
convert_to_string_ex(arg1);
593595
break;
594596

595597
default:
598+
RETVAL_FALSE;
596599
WRONG_PARAM_COUNT;
597600
break;
598601
}
@@ -667,7 +670,7 @@ PHP_FUNCTION(getimagesize)
667670
if (array_init(return_value) == FAILURE) {
668671
php_error(E_ERROR, "Unable to initialize array");
669672
efree(result);
670-
return;
673+
RETURN_FALSE;
671674
}
672675
add_index_long(return_value, 0, result->width);
673676
add_index_long(return_value, 1, result->height);
@@ -682,6 +685,8 @@ PHP_FUNCTION(getimagesize)
682685
add_assoc_long(return_value, "channels", result->channels);
683686
}
684687
efree(result);
688+
} else {
689+
RETURN_FALSE;
685690
}
686691
}
687692
/* }}} */

0 commit comments

Comments
 (0)