com php-src: Fixed bug #70455 Missing constant: IntlChar::N O_NUMERIC_VALUE: ext/intl/uchar/tests/bug7045 5.phpt ext/intl/uchar/uchar.c

From: Date: Fri, 08 Apr 2016 07:55:57 +0000
Subject: com php-src: Fixed bug #70455 Missing constant: IntlChar::N O_NUMERIC_VALUE: ext/intl/uchar/tests/bug7045 5.phpt ext/intl/uchar/uchar.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-91656@lists.php.net to get a copy of this message
Commit: 93f8eaf3b8c9400f230dc904d52508882f83ee5f Author: Anatol Belski <ab@php.net> Fri, 8 Apr 2016 09:55:57 +0200 Parents: f042c5f72644cc5817189718928f1cdead0ebedf Branches: PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=93f8eaf3b8c9400f230dc904d52508882f83ee5f Log: Fixed bug #70455 Missing constant: IntlChar::NO_NUMERIC_VALUE Bugs: https://bugs.php.net/70455 Changed paths: A ext/intl/uchar/tests/bug70455.phpt M ext/intl/uchar/uchar.c Diff: diff --git a/ext/intl/uchar/tests/bug70455.phpt b/ext/intl/uchar/tests/bug70455.phpt new file mode 100644 index 0000000..00ee898 --- /dev/null +++ b/ext/intl/uchar/tests/bug70455.phpt @@ -0,0 +1,13 @@ +--TEST-- +Bug #70455 Missing constant: IntlChar::NO_NUMERIC_VALUE +--SKIPIF-- +<?php if (!extension_loaded('intl')) die("skip requires ext/intl") ?> +--FILE-- +<?php +$value = IntlChar::getNumericValue("x"); +var_dump($value); +var_dump($value === IntlChar::NO_NUMERIC_VALUE); +?> +--EXPECT-- +float(-123456789) +bool(true) diff --git a/ext/intl/uchar/uchar.c b/ext/intl/uchar/uchar.c index 8fb09f9..755a6c9 100644 --- a/ext/intl/uchar/uchar.c +++ b/ext/intl/uchar/uchar.c @@ -737,6 +737,7 @@ int php_uchar_minit(INIT_FUNC_ARGS) { IC_CONSTL("CODEPOINT_MAX", UCHAR_MAX_VALUE) IC_CONSTL("FOLD_CASE_DEFAULT", U_FOLD_CASE_DEFAULT) IC_CONSTL("FOLD_CASE_EXCLUDE_SPECIAL_I", U_FOLD_CASE_EXCLUDE_SPECIAL_I) + zend_declare_class_constant_double(ce, "NO_NUMERIC_VALUE", sizeof("NO_NUMERIC_VALUE")-1, U_NO_NUMERIC_VALUE); /* All enums used by the uchar APIs. There are a LOT of them, * so they're separated out into include files,

« previous php.cvs (#91656) next »