We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef4647a commit 0ede7ceCopy full SHA for 0ede7ce
ext/gettext/gettext.c
@@ -190,6 +190,11 @@ PHP_FUNCTION(bindtextdomain)
190
191
PHP_GETTEXT_DOMAIN_LENGTH_CHECK(1, ZSTR_LEN(domain))
192
193
+ if (ZSTR_VAL(domain)[0] == '\0') {
194
+ zend_argument_value_error(1, "cannot be empty");
195
+ RETURN_THROWS();
196
+ }
197
+
198
if (dir == NULL) {
199
btd_result = bindtextdomain(ZSTR_VAL(domain), NULL);
200
if (btd_result == NULL) {
@@ -212,9 +217,6 @@ PHP_FUNCTION(bindtextdomain)
212
217
}
213
218
214
219
retval = bindtextdomain(ZSTR_VAL(domain), dir_name);
215
- if (retval == NULL) {
216
- RETURN_FALSE;
- }
220
221
RETURN_STRING(retval);
222
0 commit comments