diff options
Diffstat (limited to 'main/php_ini.c')
-rw-r--r-- | main/php_ini.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/main/php_ini.c b/main/php_ini.c index 8b36129a0d..384422eddb 100644 --- a/main/php_ini.c +++ b/main/php_ini.c @@ -289,3 +289,26 @@ PHP_INI_MH(OnUpdateString) *p = new_value; return SUCCESS; } + + +PHP_INI_MH(OnUpdateStringUnempty) +{ + char **p; +#ifndef ZTS + char *base = (char *) &core_globals; +#else + char *base; + PLS_FETCH(); + + base = (char *) core_globals; +#endif + + if (new_value && !new_value[0]) { + return FAILURE; + } + + p = (char **) (base+(size_t) mh_arg); + + *p = new_value; + return SUCCESS; +} |