We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48bbd28 commit a12abe4Copy full SHA for a12abe4
main/fopen_wrappers.c
@@ -226,8 +226,8 @@ PHPAPI int php_check_open_basedir(const char *path TSRMLS_DC)
226
PHPAPI int php_check_safe_mode_include_dir(char *path TSRMLS_DC)
227
{
228
/* 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))
+ if (((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode))
+ && PG(safe_mode_include_dir) && *PG(safe_mode_include_dir))
231
232
char *pathbuf;
233
char *ptr;
@@ -268,7 +268,7 @@ PHPAPI int php_check_safe_mode_include_dir(char *path TSRMLS_DC)
268
}
269
270
/* Nothing to check... */
271
- return -1;
+ return 0;
272
273
/* }}} */
274
0 commit comments