Re: ext/intl
| From: | Hannes Magnusson | Date: | Mon, 11 May 2009 07:11:22 +0000 |
| Subject: | Re: ext/intl | ||
| References: | 1 2 3 4 5 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-64949@lists.php.net to get a copy of this message | ||
On Sun, May 10, 2009 at 23:27, Stanislav Malyshev <stas@zend.com> wrote:
> Hi!
>
> I have the patch(attached) which will do the job, but it will break most of
> the tests, since it adds error messages by default. So, one of the following
> needs to be done:
> 1. Fix all the tests to accomodate error messages
> 2. Turn off warnings by default
> 3. Turn off warnings for the tests only
>
> What do you think is preferable?
Fixing the tests
> Index: php_intl.c
> ===================================================================
> RCS file: /repository/php-src/ext/intl/php_intl.c,v
> retrieving revision 1.1.2.9
> diff -u -r1.1.2.9 php_intl.c
> --- php_intl.c 26 Jan 2009 22:30:56 -0000 1.1.2.9
> +++ php_intl.c 10 May 2009 21:25:49 -0000
> @@ -454,6 +454,7 @@
> /* {{{ INI Settings */
> PHP_INI_BEGIN()
> STD_PHP_INI_ENTRY(LOCALE_INI_NAME, NULL, PHP_INI_ALL,
> OnUpdateStringUnempty, default_locale, zend_intl_globals, intl_globals)
> + STD_PHP_INI_ENTRY("intl.error_level", "2", PHP_INI_ALL,
> OnUpdateLong,
> error_level, zend_intl_globals, intl_globals)
Thats a bit cryptic.. and weird. I can set intl.error_level to 16
(E_CORE_ERROR) without anything complaining? :)
Could you rather add an function similar to
libxml_use_internal_errors(), and have the errorlevel hardcoded to
E_WARNING (or expand intl_error_set() to take E_*). New INI setting is
not cool :]
-Hannes