convert_to_string_ex(domain_name);
convert_to_string_ex(dir);
- if (strcmp(Z_STRVAL_PP(dir), "") && strcmp(Z_STRVAL_PP(dir), "0")) {
+ if (Z_STRVAL_PP(domain_name)[0] == '\0') {
+ php_error(E_WARNING, "The first parameter of bindtextdomain must not be empty");
+ RETURN_FALSE;
+ }
+
+ if (Z_STRVAL_PP(dir)[0] != '\0' && strcmp(Z_STRVAL_PP(dir), "0")) {
VCWD_REALPATH(Z_STRVAL_PP(dir), dir_name);
} else {
VCWD_GETCWD(dir_name, MAXPATHLEN);