make get_cfg_var return false
The spec says this returns false on error.
Esse commit está contido em:
@@ -125,7 +125,7 @@
|
||||
"HasDocComment"
|
||||
],
|
||||
"return": {
|
||||
"type": "String",
|
||||
"type": "Variant",
|
||||
"desc": "Returns the current value of the PHP configuration variable specified by option, or FALSE if an error occurs."
|
||||
},
|
||||
"args": [
|
||||
|
||||
@@ -118,8 +118,8 @@ Array f_get_extension_funcs(CStrRef module_name) {
|
||||
throw NotSupportedException(__func__, "extensions are built differently");
|
||||
}
|
||||
|
||||
String f_get_cfg_var(CStrRef option) {
|
||||
throw NotSupportedException(__func__, "global configurations not used");
|
||||
Variant f_get_cfg_var(CStrRef option) {
|
||||
return false;
|
||||
}
|
||||
|
||||
String f_get_current_user() {
|
||||
|
||||
@@ -30,7 +30,7 @@ int64_t f_dl(CStrRef library);
|
||||
bool f_extension_loaded(CStrRef name);
|
||||
Array f_get_loaded_extensions(bool zend_extensions = false);
|
||||
Array f_get_extension_funcs(CStrRef module_name);
|
||||
String f_get_cfg_var(CStrRef option);
|
||||
Variant f_get_cfg_var(CStrRef option);
|
||||
String f_get_current_user();
|
||||
Array f_get_defined_constants(CVarRef categorize = null_variant);
|
||||
String f_get_include_path();
|
||||
|
||||
@@ -11303,8 +11303,8 @@ const char *g_class_map[] = {
|
||||
NULL,
|
||||
NULL,
|
||||
(const char *)0x10006040, "get_cfg_var", "", (const char*)0, (const char*)0,
|
||||
"/**\n * ( excerpt from http://php.net/manual/en/function.get-cfg-var.php )\n *\n * Gets the value of a PHP configuration option.\n *\n * This function will not return configuration information set when the\n * PHP was compiled, or read from an Apache configuration file.\n *\n * To check whether the system is using a configuration file, try\n * retrieving the value of the cfg_file_path configuration setting. If this\n * is available, a configuration file is being used.\n *\n * @option string The configuration option name.\n *\n * @return string Returns the current value of the PHP configuration\n * variable specified by option, or FALSE if an error\n * occurs.\n */",
|
||||
(const char *)0x14 /* KindOfString */, (const char *)0x2000, "option", "", (const char *)0x14 /* KindOfString */, "", (const char *)0, "", (const char *)0, NULL,
|
||||
"/**\n * ( excerpt from http://php.net/manual/en/function.get-cfg-var.php )\n *\n * Gets the value of a PHP configuration option.\n *\n * This function will not return configuration information set when the\n * PHP was compiled, or read from an Apache configuration file.\n *\n * To check whether the system is using a configuration file, try\n * retrieving the value of the cfg_file_path configuration setting. If this\n * is available, a configuration file is being used.\n *\n * @option string The configuration option name.\n *\n * @return mixed Returns the current value of the PHP configuration\n * variable specified by option, or FALSE if an error\n * occurs.\n */",
|
||||
(const char *)0xffffffff /* KindOfUnknown: $t: Variant */, (const char *)0x2000, "option", "", (const char *)0x14 /* KindOfString */, "", (const char *)0, "", (const char *)0, NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
@@ -127,12 +127,8 @@ bool TestExtOptions::test_get_extension_funcs() {
|
||||
}
|
||||
|
||||
bool TestExtOptions::test_get_cfg_var() {
|
||||
try {
|
||||
f_get_cfg_var("");
|
||||
} catch (const NotSupportedException& e) {
|
||||
return Count(true);
|
||||
}
|
||||
return Count(false);
|
||||
VERIFY(!f_get_cfg_var(""))
|
||||
return Count(true);
|
||||
}
|
||||
|
||||
bool TestExtOptions::test_get_current_user() {
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário