cvs: php4(PHP_4) /ext/gettext gettext.c

From: Date: Sat, 08 Feb 2003 18:59:19 +0000
Subject: cvs: php4(PHP_4) /ext/gettext gettext.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-18499@lists.php.net to get a copy of this message
sas Sat Feb 8 13:59:19 2003 EDT Modified files: (Branch: PHP_4) /php4/ext/gettext gettext.c Log: MFH Index: php4/ext/gettext/gettext.c diff -u php4/ext/gettext/gettext.c:1.39.4.1 php4/ext/gettext/gettext.c:1.39.4.1.2.1 --- php4/ext/gettext/gettext.c:1.39.4.1 Tue Dec 31 11:34:37 2002 +++ php4/ext/gettext/gettext.c Sat Feb 8 13:59:19 2003 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gettext.c,v 1.39.4.1 2002/12/31 16:34:37 sebastian Exp $ */ +/* $Id: gettext.c,v 1.39.4.1.2.1 2003/02/08 18:59:19 sas Exp $ */ #include <stdio.h> #ifdef HAVE_CONFIG_H @@ -178,7 +178,12 @@ 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);

« previous php.cvs (#18499) next »