diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2014-09-01 20:57:33 +0400 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2014-09-01 20:57:33 +0400 |
| commit | 88d7ca44f645c6e1bbdb17affd7a34113911093d (patch) | |
| tree | 15c356bf3749c703ca52e89081ec8219d237b615 /main/fopen_wrappers.c | |
| parent | b9f3247267299cd38da851057c1bb90090db3e20 (diff) | |
| download | php-git-88d7ca44f645c6e1bbdb17affd7a34113911093d.tar.gz | |
Refactored INI subsystem to use zend_string* instead of char*
Diffstat (limited to 'main/fopen_wrappers.c')
| -rw-r--r-- | main/fopen_wrappers.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index 981c5c5a15..e375bdf413 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -94,24 +94,24 @@ PHPAPI ZEND_INI_MH(OnUpdateBaseDir) if (stage == PHP_INI_STAGE_STARTUP || stage == PHP_INI_STAGE_SHUTDOWN || stage == PHP_INI_STAGE_ACTIVATE || stage == PHP_INI_STAGE_DEACTIVATE) { /* We're in a PHP_INI_SYSTEM context, no restrictions */ - *p = new_value; + *p = new_value ? new_value->val : NULL; return SUCCESS; } /* Otherwise we're in runtime */ if (!*p || !**p) { /* open_basedir not set yet, go ahead and give it a value */ - *p = new_value; + *p = new_value->val; return SUCCESS; } /* Shortcut: When we have a open_basedir and someone tries to unset, we know it'll fail */ - if (!new_value || !*new_value) { + if (!new_value || !*new_value->val) { return FAILURE; } /* Is the proposed open_basedir at least as restrictive as the current setting? */ - ptr = pathbuf = estrdup(new_value); + ptr = pathbuf = estrdup(new_value->val); while (ptr && *ptr) { end = strchr(ptr, DEFAULT_DIR_SEPARATOR); if (end != NULL) { @@ -128,7 +128,7 @@ PHPAPI ZEND_INI_MH(OnUpdateBaseDir) efree(pathbuf); /* Everything checks out, set it */ - *p = new_value; + *p = new_value->val; return SUCCESS; } |
