Skip to content

Commit 3d6ecde

Browse files
committed
return FALSE on error
1 parent 518e61d commit 3d6ecde

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ext/standard/basic_functions.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,7 +1377,7 @@ PHP_FUNCTION(getopt)
13771377

13781378
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
13791379
&options, &options_len) == FAILURE) {
1380-
return;
1380+
RETURN_FALSE;
13811381
}
13821382

13831383
/*
@@ -2031,7 +2031,7 @@ PHP_FUNCTION(highlight_file)
20312031
zend_bool i = 0;
20322032

20332033
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|b", &filename, &i) == FAILURE) {
2034-
return;
2034+
RETURN_FALSE;
20352035
}
20362036
convert_to_string(filename);
20372037

@@ -2072,7 +2072,7 @@ PHP_FUNCTION(highlight_string)
20722072
zend_bool i = 0;
20732073

20742074
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|b", &expr, &i) == FAILURE) {
2075-
return;
2075+
RETURN_FALSE;
20762076
}
20772077
convert_to_string(expr);
20782078

@@ -2170,7 +2170,7 @@ PHP_FUNCTION(ini_get_all)
21702170
zend_module_entry *module;
21712171

21722172
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &extname, &extname_len) == FAILURE) {
2173-
return;
2173+
RETURN_FALSE;
21742174
}
21752175

21762176
zend_ini_sort_entries(TSRMLS_C);
@@ -2274,7 +2274,7 @@ PHP_FUNCTION(print_r)
22742274
zend_bool i = 0;
22752275

22762276
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|b", &var, &i) == FAILURE) {
2277-
return;
2277+
RETURN_FALSE;
22782278
}
22792279

22802280
if (i) {
@@ -2409,7 +2409,7 @@ PHP_FUNCTION(getprotobyname)
24092409
if (ent == NULL) {
24102410
Z_LVAL_P(return_value) = -1;
24112411
Z_TYPE_P(return_value) = IS_LONG;
2412-
return;
2412+
RETURN_FALSE;
24132413
}
24142414

24152415
RETURN_LONG(ent->p_proto);
@@ -2696,7 +2696,7 @@ PHP_FUNCTION(parse_ini_file)
26962696
fh.handle.fp = VCWD_FOPEN(Z_STRVAL_PP(filename), "r");
26972697
if (!fh.handle.fp) {
26982698
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot open '%s' for reading", Z_STRVAL_PP(filename));
2699-
return;
2699+
RETURN_FALSE;
27002700
}
27012701
Z_TYPE(fh) = ZEND_HANDLE_FP;
27022702
fh.filename = Z_STRVAL_PP(filename);

0 commit comments

Comments
 (0)