Skip to content

Commit a12abe4

Browse files
committed
MFH fix for bug 19292
1 parent 48bbd28 commit a12abe4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

main/fopen_wrappers.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ PHPAPI int php_check_open_basedir(const char *path TSRMLS_DC)
226226
PHPAPI int php_check_safe_mode_include_dir(char *path TSRMLS_DC)
227227
{
228228
/* Only check when safe_mode on and safe_mode_include_dir is available */
229-
if (PG(safe_mode) && PG(safe_mode_include_dir) &&
230-
*PG(safe_mode_include_dir))
229+
if (((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode))
230+
&& PG(safe_mode_include_dir) && *PG(safe_mode_include_dir))
231231
{
232232
char *pathbuf;
233233
char *ptr;
@@ -268,7 +268,7 @@ PHPAPI int php_check_safe_mode_include_dir(char *path TSRMLS_DC)
268268
}
269269

270270
/* Nothing to check... */
271-
return -1;
271+
return 0;
272272
}
273273
/* }}} */
274274

0 commit comments

Comments
 (0)