[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Sat Dec 23 01:30:56 2006 UTC Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2549r2=1.2550diff_format=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.2549 php-src/ChangeLog:1.2550 --- php-src/ChangeLog:1.2549Fri Dec 22 01:31:02 2006 +++ php-src/ChangeLog Sat Dec 23 01:30:56 2006 @@ -1,3 +1,156 @@ +2006-12-22 Andrei Zmievski [EMAIL PROTECTED] + +* unicode-progress.txt + ZendEngine2/zend_ini.c + ZendEngine2/zend_ini.h: + Implement OnUpdateUTF8String() handler. It always assumes UTF-8 input, + since we cannot check for UG(unicodE) inside it. + +* ext/standard/math.c: + Unicode support in number_format(). + +2006-12-22 Nuno Lopes [EMAIL PROTECTED] + +* ext/pdo/pdo_sql_parser.c: + fix lcov/genhtml build (yes it is very picky) + +2006-12-22 Ilia Alshanetsky [EMAIL PROTECTED] + +* ext/reflection/php_reflection.c + ext/reflection/tests/bug39884.phpt: + MFB: Fixed bug #39884 (ReflectionParameter::getClass() throws exception for + type hint self). + +* (PHP_5_2) + NEWS + ext/reflection/php_reflection.c + ext/reflection/tests/bug39884.phpt + ext/reflection/tests/bug39884.phpt: + Fixed bug #39884 (ReflectionParameter::getClass() throws exception for type + hint self). + +* ext/standard/formatted_print.c + ext/standard/tests/strings/bug36392.phpt: + MFB: Fixed bug #36392 (wrong number of decimal digits with %e specifier in + sprintf). + +* (PHP_5_2) + NEWS + ext/standard/formatted_print.c: + Fixed bug #36392 (wrong number of decimal digits with %e specifier in + sprintf). + +* ext/standard/tests/strings/bug36392.phpt + ext/standard/tests/strings/bug36392.phpt: + + file bug36392.phpt was initially added on branch PHP_5_2. + +* (PHP_5_2) + NEWS + ext/date/php_date.c: + Small optimization of the date() function + +2006-12-22 Antony Dovgal [EMAIL PROTECTED] + +* (PHP_5_2) + ext/oci8/tests/coll_018.phpt + ext/oci8/tests/error2.phpt + ext/oci8/tests/lob_036.phpt + ext/oci8/tests/statement_type.phpt: + new tests + +* ext/oci8/tests/coll_018.phpt + ext/oci8/tests/coll_018.phpt + ext/oci8/tests/error2.phpt + ext/oci8/tests/error2.phpt + ext/oci8/tests/lob_036.phpt + ext/oci8/tests/lob_036.phpt + ext/oci8/tests/statement_type.phpt: + + more OCI8 tests by Chris Jones + +* (PHP_5_2) + ext/date/tests/010.phpt + ext/date/tests/011.phpt + ext/date/tests/012.phpt + ext/date/tests/013.phpt + ext/date/tests/014.phpt + ext/date/tests/date_parse_001.phpt + ext/date/tests/date_sun_info_001.phpt: + more tests + +* ext/date/tests/010.phpt + ext/date/tests/010.phpt + ext/date/tests/011.phpt + ext/date/tests/011.phpt + ext/date/tests/012.phpt + ext/date/tests/012.phpt + ext/date/tests/013.phpt + ext/date/tests/013.phpt + ext/date/tests/014.phpt + ext/date/tests/014.phpt + ext/date/tests/date_parse_001.phpt + ext/date/tests/date_parse_001.phpt + ext/date/tests/date_sun_info_001.phpt + ext/date/tests/date_sun_info_001.phpt: + + more ext/date tests by Chris Jones + +2006-12-22 Ilia Alshanetsky [EMAIL PROTECTED] + +* ext/standard/math.c + ext/standard/tests/strings/bug39873.phpt: + MFB: Fixed bug #39873 (number_format() breaks with locale decimal + points). + +* ext/standard/tests/strings/bug39873.phpt + ext/standard/tests/strings/bug39873.phpt: + + file bug39873.phpt was initially added on branch PHP_5_2. + +* (PHP_5_2) + NEWS + ext/standard/math.c: + Fixed bug #39873 (number_format() breaks with locale decimal points). + +2006-12-22 Hannes Magnusson [EMAIL PROTECTED] + +* ext/ftp/tests/005.phpt + ext/standard/tests/array/locale_sort.phpt + ext/standard/tests/strings/substr_compare.phpt: + Fix tests + +* ext/standard/array.c: + Fix ZTS build... + +2006-12-22 Marcus Boerger [EMAIL PROTECTED] + +* ext/spl/php_spl.c: + - Fix memory allocation/deallocation to match + +* ZendEngine2/zend_alloc.c + ZendEngine2/zend_alloc.h + ZendEngine2/zend_interfaces.c: + - Implement ezstrndup() + +2006-12-22 Andrei Zmievski [EMAIL PROTECTED] + +* ext/standard/tests/serialize/006.phpt: + Fix serialization test. + +2006-12-22 Marcus Boerger [EMAIL PROTECTED] + +* ZendEngine2/zend.h + ZendEngine2/zend_interfaces.c + ext/standard/var.c + ext/standard/var_unserializer.c + ext/standard/var_unserializer.re + ext/standard/tests/serialize/005.phpt: + - Make custom serializing work with zstr (as discussed with andrei) + +* ZendEngine2/zend_alloc.c: + - Use conversion macro + 2006-12-21
[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog
changelog Sat Dec 23 01:30:59 2006 UTC Modified files: /ZendEngine2ChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1041r2=1.1042diff_format=u Index: ZendEngine2/ChangeLog diff -u ZendEngine2/ChangeLog:1.1041 ZendEngine2/ChangeLog:1.1042 --- ZendEngine2/ChangeLog:1.1041Fri Dec 22 01:31:06 2006 +++ ZendEngine2/ChangeLog Sat Dec 23 01:30:59 2006 @@ -1,3 +1,24 @@ +2006-12-22 Andrei Zmievski [EMAIL PROTECTED] + +* zend_ini.c + zend_ini.h: + Implement OnUpdateUTF8String() handler. It always assumes UTF-8 input, + since we cannot check for UG(unicodE) inside it. + +2006-12-22 Marcus Boerger [EMAIL PROTECTED] + +* zend_alloc.c + zend_alloc.h + zend_interfaces.c: + - Implement ezstrndup() + +* zend.h + zend_interfaces.c: + - Make custom serializing work with zstr (as discussed with andrei) + +* zend_alloc.c: + - Use conversion macro + 2006-12-21 Marcus Boerger [EMAIL PROTECTED] * zend_interfaces.c: @@ -16281,7 +16302,7 @@ 2003-06-10 Jani Taskinen [EMAIL PROTECTED] * zend_multiply.h: - - Missing $Id: ChangeLog,v 1.1041 2006/12/22 01:31:06 changelog Exp $ tag + - Missing $Id: ChangeLog,v 1.1042 2006/12/23 01:30:59 changelog Exp $ tag 2003-06-10 James Cox [EMAIL PROTECTED] @@ -18005,7 +18026,7 @@ zend_types.h zend_variables.c zend_variables.h: - - Added some missing CVS $Id: ChangeLog,v 1.1041 2006/12/22 01:31:06 changelog Exp $ tags, headers and footers. + - Added some missing CVS $Id: ChangeLog,v 1.1042 2006/12/23 01:30:59 changelog Exp $ tags, headers and footers. 2003-01-30 Ilia Alshanetsky [EMAIL PROTECTED]
[PHP-CVS] cvs: php-src /ext/date/tests 010.phpt 011.phpt 012.phpt 013.phpt 014.phpt date_parse_001.phpt date_sun_info_001.phpt
tony2001Fri Dec 22 13:07:27 2006 UTC Added files: /php-src/ext/date/tests 010.phpt 011.phpt 012.phpt 013.phpt 014.phpt date_parse_001.phpt date_sun_info_001.phpt Log: more ext/date tests by Chris Jones http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/010.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/010.phpt +++ php-src/ext/date/tests/010.phpt --TEST-- timezone_abbreviations_list() tests --INI-- date.timezone=UTC --FILE-- ?php $timezone_abbreviations = timezone_abbreviations_list(); var_dump($timezone_abbreviations[est]); echo Done\n; ? --EXPECTF-- array(70) { [0]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(16) America/New_York } [1]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(15) America/Antigua } [2]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(16) America/Atikokan } [3]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(21) America/Cambridge_Bay } [4]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(14) America/Cancun } [5]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(14) America/Cayman } [6]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(15) America/Chicago } [7]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(21) America/Coral_Harbour } [8]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(15) America/Detroit } [9]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(18) America/Fort_Wayne } [10]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(18) America/Grand_Turk } [11]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(28) America/Indiana/Indianapolis } [12]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(20) America/Indiana/Knox } [13]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(23) America/Indiana/Marengo } [14]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(26) America/Indiana/Petersburg } [15]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(21) America/Indiana/Vevay } [16]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(25) America/Indiana/Vincennes } [17]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(20) America/Indianapolis } [18]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(15) America/Iqaluit } [19]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(15) America/Jamaica } [20]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(27) America/Kentucky/Louisville } [21]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(27) America/Kentucky/Monticello } [22]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(15) America/Knox_IN } [23]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(18) America/Louisville } [24]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(15) America/Managua } [25]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(17) America/Menominee } [26]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(14) America/Merida } [27]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(16) America/Montreal } [28]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(14) America/Nassau } [29]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(15) America/Nipigon } [30]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(14) America/Panama } [31]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]=
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date/tests 010.phpt 011.phpt 012.phpt 013.phpt 014.phpt date_parse_001.phpt date_sun_info_001.phpt
tony2001Fri Dec 22 13:07:53 2006 UTC Added files: (Branch: PHP_5_2) /php-src/ext/date/tests 010.phpt 011.phpt 012.phpt 013.phpt 014.phpt date_parse_001.phpt date_sun_info_001.phpt Log: more tests http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/010.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/010.phpt +++ php-src/ext/date/tests/010.phpt --TEST-- timezone_abbreviations_list() tests --INI-- date.timezone=UTC --FILE-- ?php $timezone_abbreviations = timezone_abbreviations_list(); var_dump($timezone_abbreviations[est]); echo Done\n; ? --EXPECTF-- array(70) { [0]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(16) America/New_York } [1]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(15) America/Antigua } [2]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(16) America/Atikokan } [3]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(21) America/Cambridge_Bay } [4]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(14) America/Cancun } [5]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(14) America/Cayman } [6]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(15) America/Chicago } [7]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(21) America/Coral_Harbour } [8]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(15) America/Detroit } [9]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(18) America/Fort_Wayne } [10]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(18) America/Grand_Turk } [11]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(28) America/Indiana/Indianapolis } [12]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(20) America/Indiana/Knox } [13]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(23) America/Indiana/Marengo } [14]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(26) America/Indiana/Petersburg } [15]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(21) America/Indiana/Vevay } [16]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(25) America/Indiana/Vincennes } [17]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(20) America/Indianapolis } [18]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(15) America/Iqaluit } [19]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(15) America/Jamaica } [20]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(27) America/Kentucky/Louisville } [21]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(27) America/Kentucky/Monticello } [22]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(15) America/Knox_IN } [23]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(18) America/Louisville } [24]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(15) America/Managua } [25]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(17) America/Menominee } [26]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(14) America/Merida } [27]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(16) America/Montreal } [28]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(14) America/Nassau } [29]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(15) America/Nipigon } [30]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(14) America/Panama } [31]= array(3) { [dst]= bool(false) [offset]= int(-18000) [timezone_id]= string(19)
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/oci8/tests coll_018.phpt error2.phpt lob_036.phpt statement_type.phpt
tony2001Fri Dec 22 13:30:10 2006 UTC Added files: (Branch: PHP_5_2) /php-src/ext/oci8/tests coll_018.phpt error2.phpt lob_036.phpt Modified files: /php-src/ext/oci8/tests statement_type.phpt Log: new tests http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/statement_type.phpt?r1=1.1.2.3r2=1.1.2.3.2.1diff_format=u Index: php-src/ext/oci8/tests/statement_type.phpt diff -u php-src/ext/oci8/tests/statement_type.phpt:1.1.2.3 php-src/ext/oci8/tests/statement_type.phpt:1.1.2.3.2.1 --- php-src/ext/oci8/tests/statement_type.phpt:1.1.2.3 Tue Dec 6 19:28:25 2005 +++ php-src/ext/oci8/tests/statement_type.phpt Fri Dec 22 13:30:10 2006 @@ -7,22 +7,19 @@ require dirname(__FILE__)./connect.inc; -if (!empty($dbase)) { - var_dump($c = oci_connect($user, $password, $dbase)); -} -else { - var_dump($c = oci_connect($user, $password)); -} - $sqls = Array( - SELECT * FROM table, - DELETE FROM table WHERE id = 1, - INSERT INTO table VALUES(1), - UPDATE table SET id = 1, - DROP TABLE table, - CREATE TABLE table (id NUMBER), - WRONG SYNTAX, - +SELECT * FROM table, +DELETE FROM table WHERE id = 1, +INSERT INTO table VALUES(1), +UPDATE table SET id = 1, +DROP TABLE table, +CREATE TABLE table (id NUMBER), +ALTER TABLE table ADD (col1 NUMBER), +BEGIN NULL; END;, +DECLARE myn NUMBER BEGIN myn := 1; END;, +CALL myproc(1), +WRONG SYNTAX, + ); foreach ($sqls as $sql) { @@ -34,13 +31,16 @@ ? --EXPECTF-- -resource(%d) of type (oci8 connection) string(6) SELECT string(6) DELETE string(6) INSERT string(6) UPDATE string(4) DROP string(6) CREATE +string(5) ALTER +string(5) BEGIN +string(7) DECLARE +string(4) CALL string(7) UNKNOWN string(7) UNKNOWN Done http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/coll_018.phpt?view=markuprev=1.1 Index: php-src/ext/oci8/tests/coll_018.phpt +++ php-src/ext/oci8/tests/coll_018.phpt --TEST-- Collection trim tests --SKIPIF-- ?php if (!extension_loaded('oci8')) die(skip no oci8 extension); ? --FILE-- ?php require dirname(__FILE__)./connect.inc; require dirname(__FILE__)./create_type.inc; $coll1 = oci_new_collection($c, $type_name); echo Test 1.\n; var_dump($coll1-trim()); echo \nTest 2.\n; var_dump($coll1-trim(0)); echo \nTest 3.\n; var_dump($coll1-append(1)); var_dump($coll1-append(2)); var_dump($coll1-append(3)); var_dump($coll1-append(4)); var_dump($coll1-getElem(-1)); // check before the beginning var_dump($coll1-getElem(0)); var_dump($coll1-getElem(1)); var_dump($coll1-getElem(2)); var_dump($coll1-getElem(3)); var_dump($coll1-getElem(4)); // check past the end echo \nTest 4.\n; var_dump($coll1-trim(1)); var_dump($coll1-getElem(2)); // this should be the last element var_dump($coll1-getElem(3)); // this element should have gone echo \nTest 5.\n; var_dump($coll1-trim(2)); var_dump($coll1-getElem(0)); // this should be the last element var_dump($coll1-getElem(1)); // this element should have gone echo \nTest 6.\n; var_dump($coll1-trim(0)); var_dump($coll1-getElem(0)); // this should still be the last element echo \nTest 7.\n; var_dump($coll1-trim(1)); var_dump($coll1-getElem(0)); // this should have gone echo Done\n; require dirname(__FILE__)./drop_type.inc; ? --EXPECTF-- Test 1. Warning: OCI-Collection::trim() expects exactly 1 parameter, 0 given in %s on line 9 NULL Test 2. bool(true) Test 3. bool(true) bool(true) bool(true) bool(true) bool(false) float(1) float(2) float(3) float(4) bool(false) Test 4. bool(true) float(3) bool(false) Test 5. bool(true) float(1) bool(false) Test 6. bool(true) float(1) Test 7. bool(true) bool(false) Done http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/error2.phpt?view=markuprev=1.1 Index: php-src/ext/oci8/tests/error2.phpt +++ php-src/ext/oci8/tests/error2.phpt --TEST-- Exercise error code for SUCCESS_WITH_INFO --SKIPIF-- ?php if (!extension_loaded('oci8')) die(skip no oci8 extension); ? --FILE-- ?php require dirname(__FILE__).'/connect.inc'; ini_set('error_reporting', E_ALL); $s = oci_parse($c, create or replace procedure myproc as begin bogus end;); $e = @oci_execute($s); if (!$e) { $es = oci_error($s); echo $es['message'].\n; } echo Done\n; ? --EXPECTF-- ORA-24344: success with compilation error Done http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/lob_036.phpt?view=markuprev=1.1 Index: php-src/ext/oci8/tests/lob_036.phpt +++ php-src/ext/oci8/tests/lob_036.phpt --TEST-- Exercise cleanup code when LOB buffering is on --SKIPIF-- ?php if (!extension_loaded('oci8')) die(skip no oci8 extension); ? --FILE-- ?php require dirname(__FILE__).'/connect.inc'; require dirname(__FILE__).'/create_table.inc'; $ora_sql = INSERT INTO .$schema.$table_name. (blob) VALUES (empty_blob()) RETURNING blob
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/date php_date.c
iliaa Fri Dec 22 15:21:34 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/date php_date.c /php-srcNEWS Log: Small optimization of the date() function http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.35r2=1.43.2.45.2.36diff_format=u Index: php-src/ext/date/php_date.c diff -u php-src/ext/date/php_date.c:1.43.2.45.2.35 php-src/ext/date/php_date.c:1.43.2.45.2.36 --- php-src/ext/date/php_date.c:1.43.2.45.2.35 Mon Dec 11 21:04:40 2006 +++ php-src/ext/date/php_date.c Fri Dec 22 15:21:34 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_date.c,v 1.43.2.45.2.35 2006/12/11 21:04:40 iliaa Exp $ */ +/* $Id: php_date.c,v 1.43.2.45.2.36 2006/12/22 15:21:34 iliaa Exp $ */ #include php.h #include php_streams.h @@ -704,7 +704,7 @@ static char *date_format(char *format, int format_len, timelib_time *t, int localtime) { smart_strstring = {0}; - int i; + int i, length; char buffer[33]; timelib_time_offset *offset = NULL; timelib_sll isoweek, isoyear; @@ -735,72 +735,71 @@ offset = timelib_get_time_zone_info(t-sse, t-tz_info); } } - buffer[32] = '\0'; timelib_isoweek_from_date(t-y, t-m, t-d, isoweek, isoyear); for (i = 0; i format_len; i++) { switch (format[i]) { /* day */ - case 'd': snprintf(buffer, 32, %02d, (int) t-d); break; - case 'D': snprintf(buffer, 32, %s, php_date_short_day_name(t-y, t-m, t-d)); break; - case 'j': snprintf(buffer, 32, %d, (int) t-d); break; - case 'l': snprintf(buffer, 32, %s, php_date_full_day_name(t-y, t-m, t-d)); break; - case 'S': snprintf(buffer, 32, %s, english_suffix(t-d)); break; - case 'w': snprintf(buffer, 32, %d, (int) timelib_day_of_week(t-y, t-m, t-d)); break; - case 'N': snprintf(buffer, 32, %d, (int) timelib_iso_day_of_week(t-y, t-m, t-d)); break; - case 'z': snprintf(buffer, 32, %d, (int) timelib_day_of_year(t-y, t-m, t-d)); break; + case 'd': length = snprintf(buffer, 32, %02d, (int) t-d); break; + case 'D': length = snprintf(buffer, 32, %s, php_date_short_day_name(t-y, t-m, t-d)); break; + case 'j': length = snprintf(buffer, 32, %d, (int) t-d); break; + case 'l': length = snprintf(buffer, 32, %s, php_date_full_day_name(t-y, t-m, t-d)); break; + case 'S': length = snprintf(buffer, 32, %s, english_suffix(t-d)); break; + case 'w': length = snprintf(buffer, 32, %d, (int) timelib_day_of_week(t-y, t-m, t-d)); break; + case 'N': length = snprintf(buffer, 32, %d, (int) timelib_iso_day_of_week(t-y, t-m, t-d)); break; + case 'z': length = snprintf(buffer, 32, %d, (int) timelib_day_of_year(t-y, t-m, t-d)); break; /* week */ - case 'W': snprintf(buffer, 32, %02d, (int) isoweek); break; /* iso weeknr */ - case 'o': snprintf(buffer, 32, %d, (int) isoyear); break; /* iso year */ + case 'W': length = snprintf(buffer, 32, %02d, (int) isoweek); break; /* iso weeknr */ + case 'o': length = snprintf(buffer, 32, %d, (int) isoyear); break; /* iso year */ /* month */ - case 'F': snprintf(buffer, 32, %s, mon_full_names[t-m - 1]); break; - case 'm': snprintf(buffer, 32, %02d, (int) t-m); break; - case 'M': snprintf(buffer, 32, %s, mon_short_names[t-m - 1]); break; - case 'n': snprintf(buffer, 32, %d, (int) t-m); break; - case 't': snprintf(buffer, 32, %d, (int) timelib_days_in_month(t-y, t-m)); break; + case 'F': length = snprintf(buffer, 32, %s, mon_full_names[t-m - 1]); break; + case 'm': length = snprintf(buffer, 32, %02d, (int) t-m); break; + case 'M': length = snprintf(buffer, 32, %s, mon_short_names[t-m - 1]); break; + case 'n': length = snprintf(buffer, 32, %d, (int) t-m); break; + case 't': length = snprintf(buffer, 32, %d, (int) timelib_days_in_month(t-y, t-m)); break; /* year */ - case 'L': snprintf(buffer, 32, %d, timelib_is_leap((int) t-y)); break; - case 'y': snprintf(buffer, 32, %02d, (int) t-y % 100); break; - case 'Y': snprintf(buffer, 32, %04d, (int) t-y); break; +
[PHP-CVS] cvs: php-src /ext/standard formatted_print.c /ext/standard/tests/strings bug36392.phpt
iliaa Fri Dec 22 15:30:18 2006 UTC Modified files: /php-src/ext/standard/tests/strings bug36392.phpt /php-src/ext/standard formatted_print.c Log: MFB: Fixed bug #36392 (wrong number of decimal digits with %e specifier in sprintf). http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/bug36392.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/strings/bug36392.phpt diff -u /dev/null php-src/ext/standard/tests/strings/bug36392.phpt:1.2 --- /dev/null Fri Dec 22 15:30:18 2006 +++ php-src/ext/standard/tests/strings/bug36392.phptFri Dec 22 15:30:17 2006 @@ -0,0 +1,16 @@ +--TEST-- +Bug #36392 (wrong number of decimal digits with %e specifier in sprintf) +--FILE-- +?php + echo sprintf(%e\n, 1.123456789); + echo sprintf(%.10e\n, 1.123456789); + echo sprintf(%.0e\n, 1.123456789); + echo sprintf(%.1e\n, 1.123456789); + echo sprintf(%5.1e\n, 1.123456789); +? +--EXPECT-- +1.123457e+0 +1.1234567890e+0 +1e+0 +1.1e+0 +1.1e+0 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/formatted_print.c?r1=1.93r2=1.94diff_format=u Index: php-src/ext/standard/formatted_print.c diff -u php-src/ext/standard/formatted_print.c:1.93 php-src/ext/standard/formatted_print.c:1.94 --- php-src/ext/standard/formatted_print.c:1.93 Wed Dec 20 18:33:27 2006 +++ php-src/ext/standard/formatted_print.c Fri Dec 22 15:30:18 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: formatted_print.c,v 1.93 2006/12/20 18:33:27 andrei Exp $ */ +/* $Id: formatted_print.c,v 1.94 2006/12/22 15:30:18 iliaa Exp $ */ #include math.h /* modf() */ #include php.h @@ -368,9 +368,6 @@ switch (fmt) { case 'e': - if (precision) { - precision--; - } case 'E': case 'f': case 'F': -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/reflection php_reflection.c /ext/reflection/tests bug39884.phpt
iliaa Fri Dec 22 15:37:49 2006 UTC Added files: (Branch: PHP_5_2) /php-src/ext/reflection/tests bug39884.phpt Modified files: /php-srcNEWS /php-src/ext/reflection php_reflection.c Log: Fixed bug #39884 (ReflectionParameter::getClass() throws exception for type hint self). http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.453r2=1.2027.2.547.2.454diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.453 php-src/NEWS:1.2027.2.547.2.454 --- php-src/NEWS:1.2027.2.547.2.453 Fri Dec 22 15:29:41 2006 +++ php-src/NEWSFri Dec 22 15:37:48 2006 @@ -19,6 +19,8 @@ - Fixed bug #39903 (Notice message when executing __halt_compiler() more than once). (Tony) - Fixed bug #39898 (FILTER_VALIDATE_URL validates \r\n\t etc). (Ilia) +- Fixed bug #39884 (ReflectionParameter::getClass() throws exception for type + hint self). (thekid at php dot net) - Fixed bug #39873 (number_format() breaks with locale decimal points). (Ilia) - Fixed bug #39869 (safe_read does not initialize errno). http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.164.2.33.2.31r2=1.164.2.33.2.32diff_format=u Index: php-src/ext/reflection/php_reflection.c diff -u php-src/ext/reflection/php_reflection.c:1.164.2.33.2.31 php-src/ext/reflection/php_reflection.c:1.164.2.33.2.32 --- php-src/ext/reflection/php_reflection.c:1.164.2.33.2.31 Wed Oct 18 16:35:15 2006 +++ php-src/ext/reflection/php_reflection.c Fri Dec 22 15:37:48 2006 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_reflection.c,v 1.164.2.33.2.31 2006/10/18 16:35:15 johannes Exp $ */ +/* $Id: php_reflection.c,v 1.164.2.33.2.32 2006/12/22 15:37:48 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -1995,7 +1995,40 @@ GET_REFLECTION_OBJECT_PTR(param); if (param-arg_info-class_name) { - if (zend_lookup_class(param-arg_info-class_name, param-arg_info-class_name_len, pce TSRMLS_CC) == FAILURE) { + /* Class name is stored as a string, we might also get self or parent +* - For self, simply use the function scope. If scope is NULL then +* the function is global and thus self does not make any sense +* +* - For parent, use the function scope's parent. If scope is NULL then +* the function is global and thus parent does not make any sense. +* If the parent is NULL then the class does not extend anything and +* thus parent does not make any sense, either. +* +* TODO: Think about moving these checks to the compiler or some sort of +* lint-mode. +*/ + if (0 == strncmp(param-arg_info-class_name, self, sizeof(self)- 1)) { + zend_class_entry *ce= param-fptr-common.scope; + if (!ce) { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + Parameter uses 'self' as type hint but function is not a class member!); + return; + } + pce= ce; + } else if (0 == strncmp(param-arg_info-class_name, parent, sizeof(parent)- 1)) { + zend_class_entry *ce= param-fptr-common.scope; + if (!ce) { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + Parameter uses 'parent' as type hint but function is not a class member!); + return; + } + if (!ce-parent) { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + Parameter uses 'parent' as type hint although class does not have a parent!); + return; + } + pce= ce-parent; + } else if (zend_lookup_class(param-arg_info-class_name, param-arg_info-class_name_len, pce TSRMLS_CC) == FAILURE) { zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, Class %s does not exist, param-arg_info-class_name); return; @@ -4851,7 +4884,7 @@ php_info_print_table_start(); php_info_print_table_header(2, Reflection, enabled); - php_info_print_table_row(2, Version, $Id: php_reflection.c,v 1.164.2.33.2.31 2006/10/18 16:35:15 johannes Exp $); + php_info_print_table_row(2, Version, $Id: php_reflection.c,v 1.164.2.33.2.32 2006/12/22 15:37:48 iliaa Exp $); php_info_print_table_end(); } /* }}} */
[PHP-CVS] cvs: php-src /ext/reflection php_reflection.c /ext/reflection/tests bug39884.phpt
iliaa Fri Dec 22 15:38:42 2006 UTC Modified files: /php-src/ext/reflection/tests bug39884.phpt /php-src/ext/reflection php_reflection.c Log: MFB: Fixed bug #39884 (ReflectionParameter::getClass() throws exception for type hint self). http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/bug39884.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/reflection/tests/bug39884.phpt diff -u /dev/null php-src/ext/reflection/tests/bug39884.phpt:1.2 --- /dev/null Fri Dec 22 15:38:42 2006 +++ php-src/ext/reflection/tests/bug39884.phpt Fri Dec 22 15:38:42 2006 @@ -0,0 +1,22 @@ +--TEST-- +Bug #39884 (ReflectionParameter::getClass() throws exception for type hint self) +--FILE-- +?php +class stubParamTest +{ +function paramTest(self $param) +{ +// nothing to do +} +} +$test1 = new stubParamTest(); +$test2 = new stubParamTest(); +$test1-paramTest($test2); +$refParam = new ReflectionParameter(array('stubParamTest', 'paramTest'), 'param'); +var_dump($refParam-getClass()); +? +--EXPECT-- +object(ReflectionClass)#4 (1) { + [name]= + string(13) stubParamTest +} http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.268r2=1.269diff_format=u Index: php-src/ext/reflection/php_reflection.c diff -u php-src/ext/reflection/php_reflection.c:1.268 php-src/ext/reflection/php_reflection.c:1.269 --- php-src/ext/reflection/php_reflection.c:1.268 Tue Dec 19 21:38:59 2006 +++ php-src/ext/reflection/php_reflection.c Fri Dec 22 15:38:42 2006 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_reflection.c,v 1.268 2006/12/19 21:38:59 andrei Exp $ */ +/* $Id: php_reflection.c,v 1.269 2006/12/22 15:38:42 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -2009,7 +2009,41 @@ GET_REFLECTION_OBJECT_PTR(param); if (param-arg_info-class_name.v) { - if (zend_u_lookup_class_ex(UG(unicode)?IS_UNICODE:IS_STRING, param-arg_info-class_name, param-arg_info-class_name_len, 1, 1, pce TSRMLS_CC) == FAILURE) { + + /* Class name is stored as a string, we might also get self or parent +* - For self, simply use the function scope. If scope is NULL then +* the function is global and thus self does not make any sense +* +* - For parent, use the function scope's parent. If scope is NULL then +* the function is global and thus parent does not make any sense. +* If the parent is NULL then the class does not extend anything and +* thus parent does not make any sense, either. +* +* TODO: Think about moving these checks to the compiler or some sort of +* lint-mode. +*/ + if (0 == strncmp(param-arg_info-class_name.v, self, sizeof(self)- 1)) { + zend_class_entry *ce= param-fptr-common.scope; + if (!ce) { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + Parameter uses 'self' as type hint but function is not a class member!); + return; + } + pce= ce; + } else if (0 == strncmp(param-arg_info-class_name.v, parent, sizeof(parent)- 1)) { + zend_class_entry *ce= param-fptr-common.scope; + if (!ce) { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + Parameter uses 'parent' as type hint but function is not a class member!); + return; + } + if (!ce-parent) { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + Parameter uses 'parent' as type hint although class does not have a parent!); + return; + } + pce= ce-parent; + } else if (zend_u_lookup_class_ex(UG(unicode)?IS_UNICODE:IS_STRING, param-arg_info-class_name, param-arg_info-class_name_len, 1, 1, pce TSRMLS_CC) == FAILURE) { zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, Class %v does not exist, param-arg_info-class_name); return; @@ -4948,7 +4982,7 @@ php_info_print_table_start(); php_info_print_table_header(2, Reflection, enabled); - php_info_print_table_row(2, Version, $Id: php_reflection.c,v 1.268 2006/12/19 21:38:59 andrei Exp $); + php_info_print_table_row(2, Version, $Id: php_reflection.c,v 1.269 2006/12/22 15:38:42 iliaa Exp $); php_info_print_table_end(); } /* }}} */ -- PHP CVS Mailing
[PHP-CVS] cvs: CVSROOT / avail
mj Fri Dec 22 16:22:53 2006 UTC Modified files: /CVSROOTavail Log: * PEAR::DB karma http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1227r2=1.1228diff_format=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.1227 CVSROOT/avail:1.1228 --- CVSROOT/avail:1.1227Thu Dec 21 17:00:12 2006 +++ CVSROOT/avail Fri Dec 22 16:22:53 2006 @@ -368,7 +368,7 @@ avail|ashnazg|pear/PhpDocumentor,peardoc avail|zhaowei|pecl/mailparse avail|wormus|pear/Validate,peardoc -avail|aharvey|pear/Auth,pear/Config,peardoc +avail|aharvey|pear/Auth,pear/Config,pear/DB,peardoc # php windows installer avail|jmertic|php-src/win32/installer -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pdo pdo_sql_parser.c
nlopess Fri Dec 22 17:02:54 2006 UTC Modified files: /php-src/ext/pdopdo_sql_parser.c Log: fix lcov/genhtml build (yes it is very picky) http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_sql_parser.c?r1=1.48r2=1.49diff_format=u Index: php-src/ext/pdo/pdo_sql_parser.c diff -u php-src/ext/pdo/pdo_sql_parser.c:1.48 php-src/ext/pdo/pdo_sql_parser.c:1.49 --- php-src/ext/pdo/pdo_sql_parser.c:1.48 Sat Dec 9 22:18:42 2006 +++ php-src/ext/pdo/pdo_sql_parser.cFri Dec 22 17:02:54 2006 @@ -1,5 +1,5 @@ /* Generated by re2c 0.10.6 on Sat Dec 9 17:16:39 2006 */ -#line 1 pdo_sql_parser.re +#line 1 ext/pdo/pdo_sql_parser.re /* +--+ | PHP Version 5| @@ -18,7 +18,7 @@ +--+ */ -/* $Id: pdo_sql_parser.c,v 1.48 2006/12/09 22:18:42 wez Exp $ */ +/* $Id: pdo_sql_parser.c,v 1.49 2006/12/22 17:02:54 nlopess Exp $ */ #include php.h #include php_pdo_driver.h @@ -46,7 +46,7 @@ char *cursor = s-cur; s-tok = cursor; - #line 53 pdo_sql_parser.re + #line 53 ext/pdo/pdo_sql_parser.re { @@ -107,7 +107,7 @@ if(yych == '') goto yy26; goto yy30; yy3: -#line 61 pdo_sql_parser.re +#line 61 ext/pdo/pdo_sql_parser.re { RET(PDO_PARSER_TEXT); } #line 113 pdo_sql_parser.c yy4: @@ -142,7 +142,7 @@ if(yybm[0+(yych = *YYCURSOR)] 4) { goto yy13; } -#line 60 pdo_sql_parser.re +#line 60 ext/pdo/pdo_sql_parser.re { RET(PDO_PARSER_BIND_POS); } #line 148 pdo_sql_parser.c yy8: @@ -152,12 +152,12 @@ if(yybm[0+yych] 2) { goto yy8; } -#line 62 pdo_sql_parser.re +#line 62 ext/pdo/pdo_sql_parser.re { RET(PDO_PARSER_TEXT); } #line 158 pdo_sql_parser.c yy11: ++YYCURSOR; -#line 63 pdo_sql_parser.re +#line 63 ext/pdo/pdo_sql_parser.re { RET(PDO_PARSER_EOI); } #line 163 pdo_sql_parser.c yy13: @@ -167,7 +167,7 @@ if(yybm[0+yych] 4) { goto yy13; } -#line 58 pdo_sql_parser.re +#line 58 ext/pdo/pdo_sql_parser.re { RET(PDO_PARSER_TEXT); } #line 173 pdo_sql_parser.c yy16: @@ -177,7 +177,7 @@ if(yybm[0+yych] 8) { goto yy16; } -#line 59 pdo_sql_parser.re +#line 59 ext/pdo/pdo_sql_parser.re { RET(PDO_PARSER_BIND); } #line 183 pdo_sql_parser.c yy19: @@ -193,7 +193,7 @@ goto yy13; } yy22: -#line 57 pdo_sql_parser.re +#line 57 ext/pdo/pdo_sql_parser.re { RET(PDO_PARSER_TEXT); } #line 199 pdo_sql_parser.c yy23: @@ -211,7 +211,7 @@ goto yy13; } yy27: -#line 56 pdo_sql_parser.re +#line 56 ext/pdo/pdo_sql_parser.re { RET(PDO_PARSER_TEXT); } #line 217 pdo_sql_parser.c yy28: @@ -233,7 +233,7 @@ goto yy27; } } -#line 64 pdo_sql_parser.re +#line 64 ext/pdo/pdo_sql_parser.re } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard math.c
andrei Fri Dec 22 21:18:30 2006 UTC Modified files: /php-src/ext/standard math.c Log: Unicode support in number_format(). http://cvs.php.net/viewvc.cgi/php-src/ext/standard/math.c?r1=1.139r2=1.140diff_format=u Index: php-src/ext/standard/math.c diff -u php-src/ext/standard/math.c:1.139 php-src/ext/standard/math.c:1.140 --- php-src/ext/standard/math.c:1.139 Fri Dec 22 04:03:35 2006 +++ php-src/ext/standard/math.c Fri Dec 22 21:18:30 2006 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: math.c,v 1.139 2006/12/22 04:03:35 iliaa Exp $ */ +/* $Id: math.c,v 1.140 2006/12/22 21:18:30 andrei Exp $ */ #include php.h #include php_math.h @@ -1014,71 +1014,40 @@ } /* }}} */ -/* {{{ proto string number_format(float number [, int num_decimal_places [, string dec_seperator, string thousands_seperator]]) +/* {{{ proto string number_format(float number [, int num_decimal_places [, string dec_seperator, string thousands_seperator]]) U Formats a number with grouped thousands */ PHP_FUNCTION(number_format) { - zval **num, **dec, **t_s, **d_p; + char *sep1 = NULL, *sep2 = NULL; + int sep1_len, sep2_len; + double num; + int dec = 0; char thousand_sep=',', dec_point='.'; char *tmp; - switch(ZEND_NUM_ARGS()) { - case 1: - if (zend_get_parameters_ex(1, num)==FAILURE) { - RETURN_FALSE; - } - convert_to_double_ex(num); - tmp = _php_math_number_format(Z_DVAL_PP(num), 0, dec_point, thousand_sep); - RETVAL_RT_STRING(tmp, 0); - if (UG(unicode)) { - efree(tmp); - } + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, d|lss, num, dec, + sep1, sep1_len, UG(ascii_conv), + sep2, sep2_len, UG(ascii_conv)) == FAILURE) { return; - case 2: - if (zend_get_parameters_ex(2, num, dec)==FAILURE) { - RETURN_FALSE; - } - convert_to_double_ex(num); - convert_to_long_ex(dec); - tmp = _php_math_number_format(Z_DVAL_PP(num), Z_LVAL_PP(dec), dec_point, thousand_sep); - RETVAL_RT_STRING(tmp, 0); - if (UG(unicode)) { - efree(tmp); - } - return; - case 4: - if (zend_get_parameters_ex(4, num, dec, d_p, t_s)==FAILURE) { - RETURN_FALSE; - } - convert_to_double_ex(num); - convert_to_long_ex(dec); + } - if (Z_TYPE_PP(d_p) != IS_NULL) { - convert_to_string_ex(d_p); - if (Z_STRLEN_PP(d_p)=1) { - dec_point=Z_STRVAL_PP(d_p)[0]; - } else if (Z_STRLEN_PP(d_p)==0) { - dec_point=0; - } - } - if (Z_TYPE_PP(t_s) != IS_NULL) { - convert_to_string_ex(t_s); - if (Z_STRLEN_PP(t_s)=1) { - thousand_sep=Z_STRVAL_PP(t_s)[0]; - } else if(Z_STRLEN_PP(t_s)==0) { - thousand_sep=0; - } + if (sep1) { + if (sep1_len = 1) { + dec_point = sep1[0]; + } else if (sep1_len == 0) { + dec_point = 0; } - tmp = _php_math_number_format(Z_DVAL_PP(num), Z_LVAL_PP(dec), dec_point, thousand_sep); - RETVAL_RT_STRING(tmp, 0); - if (UG(unicode)) { - efree(tmp); + } + if (sep2) { + if (sep2_len = 1) { + thousand_sep = sep2[0]; + } else if (sep2_len == 0) { + thousand_sep = 0; } - return; - default: - WRONG_PARAM_COUNT; - break; } + + tmp = _php_math_number_format(num, dec, dec_point, thousand_sep); + RETVAL_ASCII_STRING(tmp, ZSTR_AUTOFREE); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard browscap.c
tony2001Thu Dec 21 21:37:09 2006 UTC Modified files: /php-src/ext/standard browscap.c Log: lookup_browser_name cannot be NULL http://cvs.php.net/viewvc.cgi/php-src/ext/standard/browscap.c?r1=1.89r2=1.90diff_format=u Index: php-src/ext/standard/browscap.c diff -u php-src/ext/standard/browscap.c:1.89 php-src/ext/standard/browscap.c:1.90 --- php-src/ext/standard/browscap.c:1.89Wed Dec 20 20:45:40 2006 +++ php-src/ext/standard/browscap.c Thu Dec 21 21:37:09 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: browscap.c,v 1.89 2006/12/20 20:45:40 andrei Exp $ */ +/* $Id: browscap.c,v 1.90 2006/12/21 21:37:09 tony2001 Exp $ */ #include php.h #include php_regex.h @@ -347,9 +347,7 @@ } } - if (lookup_browser_name) { - efree(lookup_browser_name); - } + efree(lookup_browser_name); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard browscap.c
tony2001Thu Dec 21 21:37:45 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard browscap.c Log: MFH http://cvs.php.net/viewvc.cgi/php-src/ext/standard/browscap.c?r1=1.85.2.2r2=1.85.2.2.2.1diff_format=u Index: php-src/ext/standard/browscap.c diff -u php-src/ext/standard/browscap.c:1.85.2.2 php-src/ext/standard/browscap.c:1.85.2.2.2.1 --- php-src/ext/standard/browscap.c:1.85.2.2Sun Jan 1 12:50:14 2006 +++ php-src/ext/standard/browscap.c Thu Dec 21 21:37:45 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: browscap.c,v 1.85.2.2 2006/01/01 12:50:14 sniper Exp $ */ +/* $Id: browscap.c,v 1.85.2.2.2.1 2006/12/21 21:37:45 tony2001 Exp $ */ #include php.h #include php_regex.h @@ -350,9 +350,7 @@ } } - if (lookup_browser_name) { - efree(lookup_browser_name); - } + efree(lookup_browser_name); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php