make get_cfg_var return false

The spec says this returns false on error.
Esse commit está contido em:
Paul Tarjan
2013-05-15 23:53:24 -07:00
commit de Sara Golemon
commit 2ece03bbac
5 arquivos alterados com 8 adições e 12 exclusões
+1 -1
Ver Arquivo
@@ -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": [
+2 -2
Ver Arquivo
@@ -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() {
+1 -1
Ver Arquivo
@@ -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();
+2 -2
Ver Arquivo
@@ -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,
+2 -6
Ver Arquivo
@@ -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() {