[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Fri Oct 20 01:31:15 2006 UTC Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2488r2=1.2489diff_format=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.2488 php-src/ChangeLog:1.2489 --- php-src/ChangeLog:1.2488Thu Oct 19 01:31:04 2006 +++ php-src/ChangeLog Fri Oct 20 01:31:15 2006 @@ -1,3 +1,95 @@ +2006-10-19 Sara Golemon [EMAIL PROTECTED] + +* ext/spl/tests/iterator_035.phpt: + Update test to reflect fix in spl_array.c r-1.114 + +* ext/spl/spl_array.c: + Fix working with ArrayObjects which contain arrays. + +2006-10-19 Andrei Zmievski [EMAIL PROTECTED] + +* ext/standard/microtime.c: + getrusage.c was easy(). But don't ever use zend_parse_parameters() like + that. + +* ext/standard/microtime.c: + Unicode support in microtime() and gettimeofday(). + +* ext/standard/head.c + ext/standard/info.c: + Pick some low-hanging fruit. + +* ZendEngine2/zend_API.h: + Fix potential (and real) leaks due to bad macro writing. Grrr. + +* ext/json/json.c: + Clarify why the result of json_encode() is a binary string. + +2006-10-19 Antony Dovgal [EMAIL PROTECTED] + +* ext/json/tests/001.phpt + ext/json/tests/004.phpt + ext/json/tests/005.phpt + ext/json/tests/fail001.phpt + ext/json/tests/pass001.1.phpt + ext/json/tests/pass001.phpt + ext/json/tests/pass002.phpt + ext/json/tests/pass003.phpt: + fix tests + +2006-10-19 Andrei Zmievski [EMAIL PROTECTED] + +* ZendEngine2/zend_API.h: + Fix possible double macro expansion. + +* ext/standard/image.c: + Unicode support for remaining image.c functions. + +* ext/standard/head.c: + Unicode support for headers_sent(). + +2006-10-19 Antony Dovgal [EMAIL PROTECTED] + +* (PHP_5_2) + ext/standard/tests/file/mkdir-006.phpt: + add new test by Pierre + +* ext/standard/tests/file/mkdir-006.phpt + ext/standard/tests/file/mkdir-006.phpt: + + add new test by Pierre + +2006-10-19 Hannes Magnusson [EMAIL PROTECTED] + +* (PHP_4_4) + NEWS: + BFN + +* (PHP_4_4) + Zend/zend_execute.c: + Fixed bug#38722 (Calling undefined method prints insufficient error + message) + +2006-10-19 Antony Dovgal [EMAIL PROTECTED] + +* ext/json/json.c + ext/json/php_json.h: + fix folding tags, nuke json globals + +* ZendEngine2/zend.c: + fix invalid write + +* ext/json/json.c: + fix coverity issue #262 (uninitialized variable) + +2006-10-19 Dmitry Stogov [EMAIL PROTECTED] + +* main/win95nt.h + main/win95nt.h + main/streams/plain_wrapper.c + main/streams/plain_wrapper.c: + Fixed mkdir(/tmp/foo//bar/log, 0777, true) + 2006-10-18 Ilia Alshanetsky [EMAIL PROTECTED] * ext/com_dotnet/com_extension.c:
[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog
changelog Fri Oct 20 01:31:17 2006 UTC Modified files: /ZendEngine2ChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1004r2=1.1005diff_format=u Index: ZendEngine2/ChangeLog diff -u ZendEngine2/ChangeLog:1.1004 ZendEngine2/ChangeLog:1.1005 --- ZendEngine2/ChangeLog:1.1004Thu Oct 19 01:31:08 2006 +++ ZendEngine2/ChangeLog Fri Oct 20 01:31:17 2006 @@ -1,3 +1,16 @@ +2006-10-19 Andrei Zmievski [EMAIL PROTECTED] + +* zend_API.h: + Fix potential (and real) leaks due to bad macro writing. Grrr. + +* zend_API.h: + Fix possible double macro expansion. + +2006-10-19 Antony Dovgal [EMAIL PROTECTED] + +* zend.c: + fix invalid write + 2006-10-18 Johannes Schlüter [EMAIL PROTECTED] * (PHP_5_2) @@ -15585,7 +15598,7 @@ 2003-06-10 Jani Taskinen [EMAIL PROTECTED] * zend_multiply.h: - - Missing $Id: ChangeLog,v 1.1004 2006/10/19 01:31:08 changelog Exp $ tag + - Missing $Id: ChangeLog,v 1.1005 2006/10/20 01:31:17 changelog Exp $ tag 2003-06-10 James Cox [EMAIL PROTECTED] @@ -17309,7 +17322,7 @@ zend_types.h zend_variables.c zend_variables.h: - - Added some missing CVS $Id: ChangeLog,v 1.1004 2006/10/19 01:31:08 changelog Exp $ tags, headers and footers. + - Added some missing CVS $Id: ChangeLog,v 1.1005 2006/10/20 01:31:17 changelog Exp $ tags, headers and footers. 2003-01-30 Ilia Alshanetsky [EMAIL PROTECTED]
[PHP-CVS] cvs: CVSROOT / avail
derick Thu Oct 19 09:29:14 2006 UTC Modified files: /CVSROOTavail Log: - Give bjori access to Zend engine as well. http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1196r2=1.1197diff_format=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.1196 CVSROOT/avail:1.1197 --- CVSROOT/avail:1.1196Wed Oct 18 07:08:57 2006 +++ CVSROOT/avail Thu Oct 19 09:29:14 2006 @@ -35,7 +35,7 @@ avail|iliaa,goba,wez,derick,sfox,alan_k,jacques,edink|livedocs # People who work on the Engine -avail|andi,zeev,andrei,stas,sterling,sascha,derick,sebastian,phanto,sniper,hirokawa,fujimoto,rvenkat,sesser,kalowsky,iliaa,hyanantha,georg,wez,edink,helly,hholzgra,imajes,gschlossnagle,moriyoshi,dmitry,jon,pollita,tony2001,johannes|Zend,ZendEngine2,TSRM +avail|andi,zeev,andrei,stas,sterling,sascha,derick,sebastian,phanto,sniper,hirokawa,fujimoto,rvenkat,sesser,kalowsky,iliaa,hyanantha,georg,wez,edink,helly,hholzgra,imajes,gschlossnagle,moriyoshi,dmitry,jon,pollita,tony2001,johannes,bjori|Zend,ZendEngine2,TSRM # The PHP Documentation Group maintains the documentation and its # translations. -- 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) /main win95nt.h /main/streams plain_wrapper.c
dmitry Thu Oct 19 09:49:44 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/main win95nt.h /php-src/main/streams plain_wrapper.c Log: Fixed mkdir(/tmp/foo//bar/log, 0777, true) http://cvs.php.net/viewvc.cgi/php-src/main/win95nt.h?r1=1.20.2.2r2=1.20.2.2.2.1diff_format=u Index: php-src/main/win95nt.h diff -u php-src/main/win95nt.h:1.20.2.2 php-src/main/win95nt.h:1.20.2.2.2.1 --- php-src/main/win95nt.h:1.20.2.2 Sun Jan 1 12:50:17 2006 +++ php-src/main/win95nt.h Thu Oct 19 09:49:44 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: win95nt.h,v 1.20.2.2 2006/01/01 12:50:17 sniper Exp $ */ +/* $Id: win95nt.h,v 1.20.2.2.2.1 2006/10/19 09:49:44 dmitry Exp $ */ /* Defines and types for Windows 95/NT */ #define HAVE_DECLARED_TIMEZONE @@ -41,7 +41,7 @@ #ifndef S_ISREG #define S_ISREG(m) (((m) S_IFMT) == S_IFREG) #endif -#define chdir(path) SetCurrentDirectory(path) +#define chdir(path) _chdir(path) #define mkdir(a, b)_mkdir(a) #define rmdir(a) _rmdir(a) #define getpid _getpid http://cvs.php.net/viewvc.cgi/php-src/main/streams/plain_wrapper.c?r1=1.52.2.6.2.7r2=1.52.2.6.2.8diff_format=u Index: php-src/main/streams/plain_wrapper.c diff -u php-src/main/streams/plain_wrapper.c:1.52.2.6.2.7 php-src/main/streams/plain_wrapper.c:1.52.2.6.2.8 --- php-src/main/streams/plain_wrapper.c:1.52.2.6.2.7 Thu Sep 28 07:26:02 2006 +++ php-src/main/streams/plain_wrapper.cThu Oct 19 09:49:44 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: plain_wrapper.c,v 1.52.2.6.2.7 2006/09/28 07:26:02 dmitry Exp $ */ +/* $Id: plain_wrapper.c,v 1.52.2.6.2.8 2006/10/19 09:49:44 dmitry Exp $ */ #include php.h #include php_globals.h @@ -1087,7 +1087,18 @@ int offset = 0; buf = estrndup(dir, dir_len); + +#ifdef PHP_WIN32 + e = buf; + while (*e) { + if (*e == '/') { + *e = DEFAULT_SLASH; + } + e++; + } +#else e = buf + dir_len; +#endif if ((p = memchr(buf, DEFAULT_SLASH, dir_len))) { offset = p - buf + 1; @@ -1099,9 +1110,21 @@ else { /* find a top level directory we need to create */ while ( (p = strrchr(buf + offset, DEFAULT_SLASH)) || ( offset !=1 (p = strrchr(buf, DEFAULT_SLASH))) ) { + int n = 0; + *p = '\0'; + while (p buf *(p-1) == DEFAULT_SLASH) { + ++n; + --p; + *p = '\0'; + } if (VCWD_STAT(buf, sb) == 0) { - *p = DEFAULT_SLASH; + while (1) { + *p = DEFAULT_SLASH; + if (!n) break; + --n; + ++p; + } break; } } @@ -1115,9 +1138,10 @@ } /* create any needed directories if the creation of the 1st directory worked */ while (++p != e) { - if (*p == '\0' *(p + 1) != '\0') { + if (*p == '\0') { *p = DEFAULT_SLASH; - if ((ret = VCWD_MKDIR(buf, (mode_t)mode)) 0) { + if ((*(p+1) != '\0') + (ret = VCWD_MKDIR(buf, (mode_t)mode)) 0) { if (options REPORT_ERRORS) { php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, strerror(errno)); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main win95nt.h /main/streams plain_wrapper.c
dmitry Thu Oct 19 09:49:56 2006 UTC Modified files: /php-src/main win95nt.h /php-src/main/streams plain_wrapper.c Log: Fixed mkdir(/tmp/foo//bar/log, 0777, true) http://cvs.php.net/viewvc.cgi/php-src/main/win95nt.h?r1=1.21r2=1.22diff_format=u Index: php-src/main/win95nt.h diff -u php-src/main/win95nt.h:1.21 php-src/main/win95nt.h:1.22 --- php-src/main/win95nt.h:1.21 Sun Jan 1 13:09:57 2006 +++ php-src/main/win95nt.h Thu Oct 19 09:49:56 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: win95nt.h,v 1.21 2006/01/01 13:09:57 sniper Exp $ */ +/* $Id: win95nt.h,v 1.22 2006/10/19 09:49:56 dmitry Exp $ */ /* Defines and types for Windows 95/NT */ #define HAVE_DECLARED_TIMEZONE @@ -41,7 +41,7 @@ #ifndef S_ISREG #define S_ISREG(m) (((m) S_IFMT) == S_IFREG) #endif -#define chdir(path) SetCurrentDirectory(path) +#define chdir(path) _chdir(path) #define mkdir(a, b)_mkdir(a) #define rmdir(a) _rmdir(a) #define getpid _getpid http://cvs.php.net/viewvc.cgi/php-src/main/streams/plain_wrapper.c?r1=1.73r2=1.74diff_format=u Index: php-src/main/streams/plain_wrapper.c diff -u php-src/main/streams/plain_wrapper.c:1.73 php-src/main/streams/plain_wrapper.c:1.74 --- php-src/main/streams/plain_wrapper.c:1.73 Mon Oct 2 18:13:56 2006 +++ php-src/main/streams/plain_wrapper.cThu Oct 19 09:49:56 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: plain_wrapper.c,v 1.73 2006/10/02 18:13:56 pollita Exp $ */ +/* $Id: plain_wrapper.c,v 1.74 2006/10/19 09:49:56 dmitry Exp $ */ #include php.h #include php_globals.h @@ -1072,7 +1072,18 @@ int offset = 0; buf = estrndup(dir, dir_len); + +#ifdef PHP_WIN32 + e = buf; + while (*e) { + if (*e == '/') { + *e = DEFAULT_SLASH; + } + e++; + } +#else e = buf + dir_len; +#endif if ((p = memchr(buf, DEFAULT_SLASH, dir_len))) { offset = p - buf + 1; @@ -1084,9 +1095,21 @@ else { /* find a top level directory we need to create */ while ( (p = strrchr(buf + offset, DEFAULT_SLASH)) || (offset != 1 (p = strrchr(buf, DEFAULT_SLASH))) ) { + int n = 0; + *p = '\0'; + while (p buf *(p-1) == DEFAULT_SLASH) { + ++n; + --p; + *p = '\0'; + } if (VCWD_STAT(buf, sb) == 0) { - *p = DEFAULT_SLASH; + while (1) { + *p = DEFAULT_SLASH; + if (!n) break; + --n; + ++p; + } break; } } @@ -1100,9 +1123,10 @@ } /* create any needed directories if the creation of the 1st directory worked */ while (++p != e) { - if (*p == '\0' *(p + 1) != '\0') { + if (*p == '\0') { *p = DEFAULT_SLASH; - if ((ret = VCWD_MKDIR(buf, (mode_t)mode)) 0) { + if ((*(p+1) != '\0') + (ret = VCWD_MKDIR(buf, (mode_t)mode)) 0) { if (options REPORT_ERRORS) { php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, strerror(errno)); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/json json.c
tony2001Thu Oct 19 10:01:55 2006 UTC Modified files: /php-src/ext/json json.c Log: fix coverity issue #262 (uninitialized variable) http://cvs.php.net/viewvc.cgi/php-src/ext/json/json.c?r1=1.16r2=1.17diff_format=u Index: php-src/ext/json/json.c diff -u php-src/ext/json/json.c:1.16 php-src/ext/json/json.c:1.17 --- php-src/ext/json/json.c:1.16Tue Oct 17 17:56:54 2006 +++ php-src/ext/json/json.c Thu Oct 19 10:01:54 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: json.c,v 1.16 2006/10/17 17:56:54 andrei Exp $ */ +/* $Id: json.c,v 1.17 2006/10/19 10:01:54 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -439,6 +439,7 @@ if (str_type == IS_UNICODE) { utf16 = str.u; + utf16_len = str_len; } else { utf16 = (unsigned short *) emalloc((str_len+1) * sizeof(unsigned short)); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/json json.c php_json.h
tony2001Thu Oct 19 10:12:19 2006 UTC Modified files: /php-src/ext/json json.c php_json.h Log: fix folding tags, nuke json globals http://cvs.php.net/viewvc.cgi/php-src/ext/json/json.c?r1=1.17r2=1.18diff_format=u Index: php-src/ext/json/json.c diff -u php-src/ext/json/json.c:1.17 php-src/ext/json/json.c:1.18 --- php-src/ext/json/json.c:1.17Thu Oct 19 10:01:54 2006 +++ php-src/ext/json/json.c Thu Oct 19 10:12:19 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: json.c,v 1.17 2006/10/19 10:01:54 tony2001 Exp $ */ +/* $Id: json.c,v 1.18 2006/10/19 10:12:19 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -30,9 +30,6 @@ #include JSON_parser.h #include php_json.h -/* If you declare any globals in php_json.h uncomment this: -ZEND_DECLARE_MODULE_GLOBALS(json) -*/ static const char digits[] = 0123456789abcdef; /* {{{ json_functions[] @@ -84,7 +81,8 @@ static void json_encode_r(smart_str *buf, zval *val TSRMLS_DC); static void json_escape_string(smart_str *buf, zstr s, int len, zend_uchar type); -static int json_determine_array_type(zval **val TSRMLS_DC) { +static int json_determine_array_type(zval **val TSRMLS_DC) /* {{{ */ +{ int i; HashTable *myht; @@ -122,8 +120,10 @@ return 0; } +/* }}} */ -static void json_encode_array(smart_str *buf, zval **val TSRMLS_DC) { +static void json_encode_array(smart_str *buf, zval **val TSRMLS_DC) /* {{{ */ +{ int i, r; HashTable *myht; @@ -230,10 +230,11 @@ smart_str_appendc(buf, '}'); } } +/* }}} */ #define REVERSE16(us) (((us 0xf) 12) | (((us 4) 0xf) 8) | (((us 8) 0xf) 4) | ((us 12) 0xf)) -static void json_escape_string(smart_str *buf, zstr s, int len, zend_uchar type) +static void json_escape_string(smart_str *buf, zstr s, int len, zend_uchar type) /* {{{ */ { int pos = 0; unsigned short us; @@ -341,8 +342,10 @@ efree(utf16); } } +/* }}} */ -static void json_encode_r(smart_str *buf, zval *val TSRMLS_DC) { +static void json_encode_r(smart_str *buf, zval *val TSRMLS_DC) /* {{{ */ +{ switch (Z_TYPE_P(val)) { case IS_NULL: smart_str_appendl(buf, null, 4); @@ -398,6 +401,7 @@ return; } +/* }}} */ /* {{{ proto string json_encode(mixed data) U Returns the JSON representation of a value */ @@ -416,6 +420,7 @@ smart_str_free(buf); } +/* }}} */ /* {{{ proto mixed json_decode(string json [, bool assoc]) U Decodes the JSON representation into a PHP value */ @@ -525,6 +530,7 @@ } } } +/* }}} */ /* * Local variables: http://cvs.php.net/viewvc.cgi/php-src/ext/json/php_json.h?r1=1.8r2=1.9diff_format=u Index: php-src/ext/json/php_json.h diff -u php-src/ext/json/php_json.h:1.8 php-src/ext/json/php_json.h:1.9 --- php-src/ext/json/php_json.h:1.8 Sat Mar 18 04:15:16 2006 +++ php-src/ext/json/php_json.h Thu Oct 19 10:12:19 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_json.h,v 1.8 2006/03/18 04:15:16 omar Exp $ */ +/* $Id: php_json.h,v 1.9 2006/10/19 10:12:19 tony2001 Exp $ */ #ifndef PHP_JSON_H #define PHP_JSON_H @@ -41,15 +41,8 @@ PHP_FUNCTION(json_encode); PHP_FUNCTION(json_decode); -#ifdef ZTS -#define JSON_G(v) TSRMG(json_globals_id, zend_json_globals *, v) -#else -#define JSON_G(v) (json_globals.v) -#endif - #endif /* PHP_JSON_H */ - /* * Local variables: * tab-width: 4 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_4) / NEWS
bjori Thu Oct 19 11:27:36 2006 UTC Modified files: (Branch: PHP_4_4) /php-srcNEWS Log: BFN http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.1247.2.920.2.169r2=1.1247.2.920.2.170diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.920.2.169 php-src/NEWS:1.1247.2.920.2.170 --- php-src/NEWS:1.1247.2.920.2.169 Wed Oct 18 20:59:38 2006 +++ php-src/NEWSThu Oct 19 11:27:36 2006 @@ -10,6 +10,8 @@ - Fixed bug #38882 (ldap_connect causes segfault with newer versions of OpenLDAP). (Tony) - Fixed bug #38859 (parse_url() fails if passing '@' in passwd). (Tony,Ilia) +- Fixed bug #38722 (Calling undefined method prints insufficient error message) + (Hannes) - Fixed bug #38534 (segfault when calling setlocale() in userspace session handler). (Tony) - Fixed bug #38450 (constructor is not called for classes used in userspace -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/file mkdir-006.phpt
tony2001Thu Oct 19 12:06:57 2006 UTC Added files: /php-src/ext/standard/tests/filemkdir-006.phpt Log: add new test by Pierre http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/mkdir-006.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/mkdir-006.phpt +++ php-src/ext/standard/tests/file/mkdir-006.phpt --TEST-- recursive mkdir() with unclean paths --SKIPIF-- ?php if (substr(PHP_OS, 0, 3) != 'WIN') { die('skip only for Windows'); } ? --FILE-- ?php chdir(dirname(__FILE__)); $dirpath = ./tmp/foo//bar/logs; mkdir($dirpath, 0777, true); if (is_dir($dirpath)) { echo Ok.\n; } else { echo Failed.\n; } rmdir(./tmp/foo/bar/logs); rmdir(./tmp/foo/bar/); rmdir(./tmp/foo/); rmdir(./tmp/); ? --EXPECT-- Ok. -- 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/tests/file mkdir-006.phpt
tony2001Thu Oct 19 12:07:07 2006 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/filemkdir-006.phpt Log: add new test by Pierre http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/mkdir-006.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/mkdir-006.phpt +++ php-src/ext/standard/tests/file/mkdir-006.phpt --TEST-- recursive mkdir() with unclean paths --SKIPIF-- ?php if (substr(PHP_OS, 0, 3) != 'WIN') { die('skip only for Windows'); } ? --FILE-- ?php chdir(dirname(__FILE__)); $dirpath = ./tmp/foo//bar/logs; mkdir($dirpath, 0777, true); if (is_dir($dirpath)) { echo Ok.\n; } else { echo Failed.\n; } rmdir(./tmp/foo/bar/logs); rmdir(./tmp/foo/bar/); rmdir(./tmp/foo/); rmdir(./tmp/); ? --EXPECT-- Ok. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / avail
pajoye Thu Oct 19 14:17:13 2006 UTC Modified files: /CVSROOTavail Log: - pear peardoc karma for amir http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1197r2=1.1198diff_format=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.1197 CVSROOT/avail:1.1198 --- CVSROOT/avail:1.1197Thu Oct 19 09:29:14 2006 +++ CVSROOT/avail Thu Oct 19 14:17:13 2006 @@ -62,7 +62,7 @@ # The PEAR Team has access to the full PEAR tree, the PEAR portion of # the PHP tree, the PEAR website, and the PEAR documentation. -avail|andrew,moh,sterling,jon,jlp,sebastian,troels,urs,jpm,adaniel,tuupola,mj,metallic,richard,aj,andre,zimt,uw,bjoern,chregu,tfromm,subjective,cox,jmcastagnetto,kaltoft,jccann,amiller,mansion,zyprexia,alexmerz,yavo,clambert,vblavet,bernd,nohn,mog,mfischer,kvn,jan,eru,murahachibu,hayk,cain,nhoizey,aditus,ludoo,imajes,graeme,eriksson,jasonlotito,dallen,lsmith,timmyg,artka,tal,kk,cmv,rashid,alexios,baba,reywob,ekilfoil,antonio,sagi,jrust,mehl,dickmann,alan_k,fab,thku,busterb,miked,pgc,ctrlsoft,tychay,dexter,sachat,svenasse,mw21st,arahn,matthias,dias,jfbus,derick,chief,sigi,tony,olivier,nepto,voyteck,cnb,dams,peterk,ernani,edink,quipo,egnited,arnaud,mcmontero,mbretter,nicos,philip,xnoguer,sjr,meebey,jellybob,darkelder,max,dcowgill,daggilli,kuboa,ncowham,sklar,krausbn,ordnas,avb,polone,datenpunk,inorm,llucax,davey,moosh,et,mscifo,yunosh,thesaur,hburbach,ohill,cellog,hlellelid,rmcclain,vincent,heino,neufeind,didou,schst,alain,mrcool,mroch,mike,vgoebbels,mixtli,farell,pmjones,jw,! darknoise,tarjei,toby,danielc,ieure,metz,gurugeek,rich_y,asnagy,muesli,hcebay,khassani,zamana,aidan,dufuz,sergiosgc,kouber,enemerson,iridium,ortega,guillaume,koyama,scottmattocks,eric,wenz,goetsch,tacker,aph,bolk,cweiske,amt,jinxidoru,cbleek,nosey,abaker,jayeshsh,fredericpoeydome,sean,toggg,navin,pfischer,davidc,markus,cross,crafics,roychri,kore,troehr,sfrausch,bdunlap,drewish,firman,epte,timj,taak,ssuceveanu,bate,anant,hirose31,amistry,thesee,jausions,ostborn,wiesemann|pear,peardoc +avail|andrew,moh,sterling,jon,jlp,sebastian,troels,urs,jpm,adaniel,tuupola,mj,metallic,richard,aj,andre,zimt,uw,bjoern,chregu,tfromm,subjective,cox,jmcastagnetto,kaltoft,jccann,amiller,mansion,zyprexia,alexmerz,yavo,clambert,vblavet,bernd,nohn,mog,mfischer,kvn,jan,eru,murahachibu,hayk,cain,nhoizey,aditus,ludoo,imajes,graeme,eriksson,jasonlotito,dallen,lsmith,timmyg,artka,tal,kk,cmv,rashid,alexios,baba,reywob,ekilfoil,antonio,sagi,jrust,mehl,dickmann,alan_k,fab,thku,busterb,miked,pgc,ctrlsoft,tychay,dexter,sachat,svenasse,mw21st,arahn,matthias,dias,jfbus,derick,chief,sigi,tony,olivier,nepto,voyteck,cnb,dams,peterk,ernani,edink,quipo,egnited,arnaud,mcmontero,mbretter,nicos,philip,xnoguer,sjr,meebey,jellybob,darkelder,max,dcowgill,daggilli,kuboa,ncowham,sklar,krausbn,ordnas,avb,polone,datenpunk,inorm,llucax,davey,moosh,et,mscifo,yunosh,thesaur,hburbach,ohill,cellog,hlellelid,rmcclain,vincent,heino,neufeind,didou,schst,alain,mrcool,mroch,mike,vgoebbels,mixtli,farell,pmjones,jw,! darknoise,tarjei,toby,danielc,ieure,metz,gurugeek,rich_y,asnagy,muesli,hcebay,khassani,zamana,aidan,dufuz,sergiosgc,kouber,enemerson,iridium,ortega,guillaume,koyama,scottmattocks,eric,wenz,goetsch,tacker,aph,bolk,cweiske,amt,jinxidoru,cbleek,nosey,abaker,jayeshsh,fredericpoeydome,sean,toggg,navin,pfischer,davidc,markus,cross,crafics,roychri,kore,troehr,sfrausch,bdunlap,drewish,firman,epte,timj,taak,ssuceveanu,bate,anant,hirose31,amistry,thesee,jausions,ostborn,wiesemann,amir|pear,peardoc # PEAR bits in the main php-src module avail|cox,mj,vblavet,dickmann,tal,jmcastagnetto,alexmerz,cellog,pajoye,timj,clay|php-src/pear,pear-core @@ -332,7 +332,6 @@ avail|makoto|pear/Services_Hatena avail|ehlersd|pear/Net_Geo avail|lyaish|pear/HTML_AJAX -avail|amir|pear/XML_XUL,pear/Services_Ebay,pear/Validate avail|wittend|pear/File_DICOM,peardoc avail|ccollie|ext/unicode avail|lukasfeiler|peardoc,pear/XML_Query2XML -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard head.c
andrei Thu Oct 19 17:55:33 2006 UTC Modified files: /php-src/ext/standard head.c Log: Unicode support for headers_sent(). http://cvs.php.net/viewvc.cgi/php-src/ext/standard/head.c?r1=1.90r2=1.91diff_format=u Index: php-src/ext/standard/head.c diff -u php-src/ext/standard/head.c:1.90 php-src/ext/standard/head.c:1.91 --- php-src/ext/standard/head.c:1.90Mon Oct 16 19:27:00 2006 +++ php-src/ext/standard/head.c Thu Oct 19 17:55:33 2006 @@ -15,7 +15,7 @@ | Author: Rasmus Lerdorf [EMAIL PROTECTED]| +--+ */ -/* $Id: head.c,v 1.90 2006/10/16 19:27:00 tony2001 Exp $ */ +/* $Id: head.c,v 1.91 2006/10/19 17:55:33 andrei Exp $ */ #include stdio.h #include php.h @@ -191,7 +191,7 @@ /* }}} */ -/* {{{ proto bool headers_sent([string $file [, int $line]]) +/* {{{ proto bool headers_sent([string $file [, int $line]]) U Returns true if headers have already been sent, false otherwise */ PHP_FUNCTION(headers_sent) { @@ -208,17 +208,28 @@ } switch(ZEND_NUM_ARGS()) { - case 2: - zval_dtor(arg2); - ZVAL_LONG(arg2, line); - case 1: - zval_dtor(arg1); - if (file) { - ZVAL_STRING(arg1, file, 1); - } else { - ZVAL_STRING(arg1, , 1); - } - break; + case 2: + zval_dtor(arg2); + ZVAL_LONG(arg2, line); + case 1: + zval_dtor(arg1); + if (UG(unicode)) { + UChar *ufile; + int ufile_len; + + if (file SUCCESS == php_stream_path_decode(NULL, ufile, ufile_len, file, strlen(file), REPORT_ERRORS, FG(default_context))) { + ZVAL_UNICODEL(arg1, ufile, ufile_len, 0); + } else { + ZVAL_EMPTY_UNICODE(arg1); + } + } else { + if (file) { + ZVAL_STRING(arg1, file, 1); + } else { + ZVAL_STRING(arg1, , 1); + } + } + break; } if (SG(headers_sent)) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard image.c
andrei Thu Oct 19 18:20:13 2006 UTC Modified files: /php-src/ext/standard image.c Log: Unicode support for remaining image.c functions. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/image.c?r1=1.126r2=1.127diff_format=u Index: php-src/ext/standard/image.c diff -u php-src/ext/standard/image.c:1.126 php-src/ext/standard/image.c:1.127 --- php-src/ext/standard/image.c:1.126 Sun Oct 8 13:34:23 2006 +++ php-src/ext/standard/image.cThu Oct 19 18:20:13 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: image.c,v 1.126 2006/10/08 13:34:23 bjori Exp $ */ +/* $Id: image.c,v 1.127 2006/10/19 18:20:13 andrei Exp $ */ #include php.h #include stdio.h @@ -458,7 +458,7 @@ if (zend_ascii_hash_find(Z_ARRVAL_P(info), markername, strlen(markername)+1, (void **) tmp) == FAILURE) { /* XXX we onyl catch the 1st tag of it's kind! */ - add_ascii_assoc_stringl(info, markername, buffer, length, 1); + add_ascii_assoc_rt_stringl(info, markername, buffer, length, 1); } efree(buffer); @@ -1115,25 +1115,23 @@ } /* }}} */ -/* {{{ proto string image_type_to_mime_type(int imagetype) +/* {{{ proto string image_type_to_mime_type(int imagetype) U Get Mime-Type for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype */ PHP_FUNCTION(image_type_to_mime_type) { - zval **p_image_type; - int arg_c = ZEND_NUM_ARGS(); + long image_type; char *temp; - if ((arg_c!=1) || zend_get_parameters_ex(arg_c, p_image_type) == FAILURE) { - RETVAL_FALSE; - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, image_type) == FAILURE) { + return; } - convert_to_long_ex(p_image_type); - temp = (char*)php_image_type_to_mime_type(Z_LVAL_PP(p_image_type)); + + temp = (char*)php_image_type_to_mime_type(image_type); ZVAL_ASCII_STRING(return_value, temp, 1); } /* }}} */ -/* {{{ proto string image_type_to_extension(int imagetype [, bool include_dot]) +/* {{{ proto string image_type_to_extension(int imagetype [, bool include_dot]) U Get file extension for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype */ PHP_FUNCTION(image_type_to_extension) { @@ -1284,49 +1282,34 @@ } /* }}} */ -/* {{{ proto array getimagesize(string imagefile [, array info]) +/* {{{ proto array getimagesize(string imagefile [, array info]) U Get the size of an image as 4-element array */ PHP_FUNCTION(getimagesize) { - zval **arg1, **info = NULL; + zval **pp_file, *info = NULL; int itype = 0; char *temp; + char *filename; + int filename_len; struct gfxinfo *result = NULL; php_stream * stream = NULL; - switch(ZEND_NUM_ARGS()) { - - case 1: - if (zend_get_parameters_ex(1, arg1) == FAILURE) { - RETVAL_FALSE; - WRONG_PARAM_COUNT; - } - convert_to_string_ex(arg1); - break; - - case 2: - if (zend_get_parameters_ex(2, arg1, info) == FAILURE) { - RETVAL_FALSE; - WRONG_PARAM_COUNT; - } - zval_dtor(*info); - - array_init(*info); - - convert_to_string_ex(arg1); - break; - - default: - RETVAL_FALSE; - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, Z|z, pp_file, info) == FAILURE || + php_stream_path_param_encode(pp_file, filename, filename_len, REPORT_ERRORS, FG(default_context)) == FAILURE) { + return; } - stream = php_stream_open_wrapper(Z_STRVAL_PP(arg1), rb, STREAM_MUST_SEEK|REPORT_ERRORS|IGNORE_PATH, NULL); + stream = php_stream_open_wrapper(filename, rb, STREAM_MUST_SEEK|REPORT_ERRORS|IGNORE_PATH, NULL); if (!stream) { RETURN_FALSE; } + if (info) { + zval_dtor(info); + array_init(info); + } + itype = php_getimagetype(stream, NULL TSRMLS_CC); switch( itype) { case IMAGE_FILETYPE_GIF: @@ -1334,7 +1317,7 @@ break; case IMAGE_FILETYPE_JPEG: if (info) { - result = php_handle_jpeg(stream, *info TSRMLS_CC); + result = php_handle_jpeg(stream, info TSRMLS_CC); } else { result = php_handle_jpeg(stream, NULL TSRMLS_CC); } @@ -1393,10 +1376,7 @@ add_index_long(return_value, 1, result-height); add_index_long(return_value, 2, itype);
[PHP-CVS] cvs: php-src /ext/json/tests 001.phpt 004.phpt 005.phpt fail001.phpt pass001.1.phpt pass001.phpt pass002.phpt pass003.phpt
tony2001Thu Oct 19 20:17:17 2006 UTC Modified files: /php-src/ext/json/tests 001.phpt 004.phpt 005.phpt fail001.phpt pass001.1.phpt pass001.phpt pass002.phpt pass003.phpt Log: fix tests http://cvs.php.net/viewvc.cgi/php-src/ext/json/tests/001.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/json/tests/001.phpt diff -u php-src/ext/json/tests/001.phpt:1.3 php-src/ext/json/tests/001.phpt:1.4 --- php-src/ext/json/tests/001.phpt:1.3 Mon Aug 7 21:51:06 2006 +++ php-src/ext/json/tests/001.phpt Thu Oct 19 20:17:17 2006 @@ -31,43 +31,43 @@ NULL NULL NULL +string(1) . +string(1) . +string(3) ? +string(1) ; +string(12) ÑÑÑÑÐ¸Ñ +string(4) blah NULL -NULL -NULL -NULL -NULL -NULL -NULL -object(stdClass)#1 (1) { +object(stdClass)#%d (1) { [test]= - object(stdClass)#2 (1) { + object(stdClass)#%d (1) { [foo]= string(3) bar } } -object(stdClass)#1 (1) { +object(stdClass)#%d (1) { [test]= - object(stdClass)#2 (1) { + object(stdClass)#%d (1) { [foo]= string(0) } } -object(stdClass)#1 (1) { +object(stdClass)#%d (1) { [_empty_]= - object(stdClass)#2 (1) { + object(stdClass)#%d (1) { [foo]= string(0) } } -object(stdClass)#1 (1) { +object(stdClass)#%d (1) { [_empty_]= - object(stdClass)#2 (1) { + object(stdClass)#%d (1) { [_empty_]= string(0) } } -NULL -NULL +string(16) { : { : } +string(16) { : : } } Done --UEXPECTF-- Warning: json_decode() expects at least 1 parameter, 0 given in %s on line %d @@ -75,41 +75,41 @@ NULL NULL NULL +unicode(1) . +unicode(1) . +unicode(3) ? +unicode(1) ; +unicode(6) ÑÑÑÑÐ¸Ñ +unicode(4) blah NULL -NULL -NULL -NULL -NULL -NULL -NULL -object(stdClass)#1 (1) { +object(stdClass)#%d (1) { [utest]= - object(stdClass)#2 (1) { + object(stdClass)#%d (1) { [ufoo]= -string(3) bar +unicode(3) bar } } -object(stdClass)#1 (1) { +object(stdClass)#%d (1) { [utest]= - object(stdClass)#2 (1) { + object(stdClass)#%d (1) { [ufoo]= -string(0) +unicode(0) } } -object(stdClass)#1 (1) { +object(stdClass)#%d (1) { [u_empty_]= - object(stdClass)#2 (1) { + object(stdClass)#%d (1) { [ufoo]= -string(0) +unicode(0) } } -object(stdClass)#1 (1) { +object(stdClass)#%d (1) { [u_empty_]= - object(stdClass)#2 (1) { + object(stdClass)#%d (1) { [u_empty_]= -string(0) +unicode(0) } } -NULL -NULL +unicode(16) { : { : } +unicode(16) { : : } } Done http://cvs.php.net/viewvc.cgi/php-src/ext/json/tests/004.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/json/tests/004.phpt diff -u php-src/ext/json/tests/004.phpt:1.2 php-src/ext/json/tests/004.phpt:1.3 --- php-src/ext/json/tests/004.phpt:1.2 Thu Jul 20 09:33:15 2006 +++ php-src/ext/json/tests/004.phpt Thu Oct 19 20:17:17 2006 @@ -25,3 +25,15 @@ Warning: json_encode(): recursion detected in %s on line %d string(22) {prop:{prop:null}} Done +--UEXPECTF-- +object(stdClass)#%d (1) { + [uprop]= + object(stdClass)#%d (1) { +[uprop]= +*RECURSION* + } +} + +Warning: json_encode(): recursion detected in %s on line %d +string(22) {prop:{prop:null}} +Done http://cvs.php.net/viewvc.cgi/php-src/ext/json/tests/005.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/json/tests/005.phpt diff -u php-src/ext/json/tests/005.phpt:1.2 php-src/ext/json/tests/005.phpt:1.3 --- php-src/ext/json/tests/005.phpt:1.2 Thu Jul 20 09:33:15 2006 +++ php-src/ext/json/tests/005.phpt Thu Oct 19 20:17:17 2006 @@ -25,3 +25,15 @@ Warning: json_encode(): recursion detected in %s on line %d string(8) [[null]] Done +--UEXPECTF-- +array(1) { + [0]= + array(1) { +[0]= +*RECURSION* + } +} + +Warning: json_encode(): recursion detected in %s on line %d +unicode(8) [[null]] +Done http://cvs.php.net/viewvc.cgi/php-src/ext/json/tests/fail001.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/json/tests/fail001.phpt diff -u php-src/ext/json/tests/fail001.phpt:1.2 php-src/ext/json/tests/fail001.phpt:1.3 --- php-src/ext/json/tests/fail001.phpt:1.2 Mon Aug 7 23:33:57 2006 +++ php-src/ext/json/tests/fail001.phpt Thu Oct 19 20:17:17 2006 @@ -45,121 +45,242 @@ --EXPECT-- Testing: A JSON payload should be an object or array, not a string. AS OBJECT -NULL +string(58) A JSON payload should be an object or array, not a string. AS ARRAY -NULL +string(58) A JSON payload should be an object or array, not a string. Testing: [Unclosed array AS OBJECT -NULL +string(17) [Unclosed array AS ARRAY -NULL +string(17) [Unclosed array Testing: {unquoted_key: keys must be quoted} AS OBJECT -NULL +string(36) {unquoted_key: keys must be quoted} AS ARRAY -NULL +string(36) {unquoted_key: keys must be quoted} Testing: [extra comma,] AS OBJECT -NULL +string(16) [extra comma,] AS ARRAY -NULL +string(16) [extra comma,] Testing: [double extra comma,,] AS OBJECT -NULL +string(24) [double extra comma,,] AS
[PHP-CVS] cvs: php-src /ext/json json.c
andrei Thu Oct 19 20:24:25 2006 UTC Modified files: /php-src/ext/json json.c Log: Clarify why the result of json_encode() is a binary string. http://cvs.php.net/viewvc.cgi/php-src/ext/json/json.c?r1=1.18r2=1.19diff_format=u Index: php-src/ext/json/json.c diff -u php-src/ext/json/json.c:1.18 php-src/ext/json/json.c:1.19 --- php-src/ext/json/json.c:1.18Thu Oct 19 10:12:19 2006 +++ php-src/ext/json/json.c Thu Oct 19 20:24:25 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: json.c,v 1.18 2006/10/19 10:12:19 tony2001 Exp $ */ +/* $Id: json.c,v 1.19 2006/10/19 20:24:25 andrei Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -416,6 +416,10 @@ json_encode_r(buf, parameter TSRMLS_CC); + /* +* Return as binary string, since the result is 99% likely to be just +* echo'ed out and we want to avoid overhead of double conversion. +*/ ZVAL_STRINGL(return_value, buf.c, buf.len, 1); smart_str_free(buf); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard head.c info.c
andrei Thu Oct 19 20:55:08 2006 UTC Modified files: /php-src/ext/standard head.c info.c Log: Pick some low-hanging fruit. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/head.c?r1=1.91r2=1.92diff_format=u Index: php-src/ext/standard/head.c diff -u php-src/ext/standard/head.c:1.91 php-src/ext/standard/head.c:1.92 --- php-src/ext/standard/head.c:1.91Thu Oct 19 17:55:33 2006 +++ php-src/ext/standard/head.c Thu Oct 19 20:55:08 2006 @@ -15,7 +15,7 @@ | Author: Rasmus Lerdorf [EMAIL PROTECTED]| +--+ */ -/* $Id: head.c,v 1.91 2006/10/19 17:55:33 andrei Exp $ */ +/* $Id: head.c,v 1.92 2006/10/19 20:55:08 andrei Exp $ */ #include stdio.h #include php.h @@ -247,11 +247,11 @@ sapi_header_struct *sapi_header = (sapi_header_struct *)data; if (arg sapi_header) { - add_next_index_string((zval *)arg, (char *)(sapi_header-header), 1); + add_next_index_ascii_string((zval *)arg, (char *)(sapi_header-header), 1); } } -/* {{{ proto array headers_list(void) +/* {{{ proto array headers_list(void) U Return list of headers to be sent / already sent */ PHP_FUNCTION(headers_list) { http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.269r2=1.270diff_format=u Index: php-src/ext/standard/info.c diff -u php-src/ext/standard/info.c:1.269 php-src/ext/standard/info.c:1.270 --- php-src/ext/standard/info.c:1.269 Tue Sep 19 10:38:31 2006 +++ php-src/ext/standard/info.c Thu Oct 19 20:55:08 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: info.c,v 1.269 2006/09/19 10:38:31 dmitry Exp $ */ +/* $Id: info.c,v 1.270 2006/10/19 20:55:08 andrei Exp $ */ #include php.h #include php_ini.h @@ -1004,25 +1004,26 @@ /* }}} */ -/* {{{ proto string phpversion([string extension]) +/* {{{ proto string phpversion([string extension]) U Return the current PHP version */ PHP_FUNCTION(phpversion) { - zval **arg; - int argc = ZEND_NUM_ARGS(); + char *ext_name = NULL; + int ext_name_len = 0; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |s, ext_name, ext_name_len) == FAILURE) { + return; + } - if (argc == 0) { + if (!ext_name) { RETURN_ASCII_STRING(PHP_VERSION, 1); - } else if (argc == 1 zend_get_parameters_ex(1, arg) == SUCCESS) { + } else { char *version; - convert_to_string_ex(arg); - version = zend_get_module_version(Z_STRVAL_PP(arg)); + version = zend_get_module_version(ext_name); if (version == NULL) { RETURN_FALSE; } RETURN_ASCII_STRING(version, 1); - } else { - WRONG_PARAM_COUNT; } } /* }}} */ @@ -1071,62 +1072,60 @@ } /* }}} */ -/* {{{ proto string php_logo_guid(void) +/* {{{ proto string php_logo_guid(void) U Return the special ID used to request the PHP logo in phpinfo screens*/ PHP_FUNCTION(php_logo_guid) { - - if (ZEND_NUM_ARGS() != 0) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ) == FAILURE) { + return; } - RETURN_ASCII_STRING(php_logo_guid(), 0); + RETURN_ASCII_STRING(php_logo_guid(), ZSTR_AUTOFREE); } /* }}} */ -/* {{{ proto string php_real_logo_guid(void) +/* {{{ proto string php_real_logo_guid(void) U Return the special ID used to request the PHP logo in phpinfo screens*/ PHP_FUNCTION(php_real_logo_guid) { - - if (ZEND_NUM_ARGS() != 0) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ) == FAILURE) { + return; } RETURN_ASCII_STRINGL(PHP_LOGO_GUID, sizeof(PHP_LOGO_GUID)-1, 1); } /* }}} */ -/* {{{ proto string php_egg_logo_guid(void) +/* {{{ proto string php_egg_logo_guid(void) U Return the special ID used to request the PHP logo in phpinfo screens*/ PHP_FUNCTION(php_egg_logo_guid) { - if (ZEND_NUM_ARGS() != 0) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ) == FAILURE) { + return; } RETURN_ASCII_STRINGL(PHP_EGG_LOGO_GUID, sizeof(PHP_EGG_LOGO_GUID)-1, 1); } /* }}} */ -/* {{{ proto string zend_logo_guid(void) +/* {{{ proto string zend_logo_guid(void) U Return the special ID used to request the Zend logo in phpinfo screens*/ PHP_FUNCTION(zend_logo_guid) { - if (ZEND_NUM_ARGS() != 0) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ) == FAILURE) { + return; } RETURN_ASCII_STRINGL(ZEND_LOGO_GUID, sizeof(ZEND_LOGO_GUID)-1, 1); } /* }}} */ -/* {{{ proto string php_sapi_name(void) +/* {{{
[PHP-CVS] cvs: php-src /ext/standard microtime.c
andrei Thu Oct 19 22:11:05 2006 UTC Modified files: /php-src/ext/standard microtime.c Log: Unicode support in microtime() and gettimeofday(). http://cvs.php.net/viewvc.cgi/php-src/ext/standard/microtime.c?r1=1.56r2=1.57diff_format=u Index: php-src/ext/standard/microtime.c diff -u php-src/ext/standard/microtime.c:1.56 php-src/ext/standard/microtime.c:1.57 --- php-src/ext/standard/microtime.c:1.56 Tue Sep 19 10:38:31 2006 +++ php-src/ext/standard/microtime.cThu Oct 19 22:11:04 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: microtime.c,v 1.56 2006/09/19 10:38:31 dmitry Exp $ */ +/* $Id: microtime.c,v 1.57 2006/10/19 22:11:04 andrei Exp $ */ #include php.h @@ -85,11 +85,11 @@ char ret[100]; snprintf(ret, 100, %.8f %ld, tp.tv_usec / MICRO_IN_SEC, tp.tv_sec); - RETURN_STRING(ret, 1); + RETURN_ASCII_STRING(ret, ZSTR_DUPLICATE); } } -/* {{{ proto mixed microtime([bool get_as_float]) +/* {{{ proto mixed microtime([bool get_as_float]) U Returns either a string or a float containing the current time in seconds and microseconds */ PHP_FUNCTION(microtime) { @@ -97,7 +97,7 @@ } /* }}} */ -/* {{{ proto array gettimeofday([bool get_as_float]) +/* {{{ proto array gettimeofday([bool get_as_float]) U Returns the current time as array */ PHP_FUNCTION(gettimeofday) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/spl spl_array.c
pollita Thu Oct 19 22:20:44 2006 UTC Modified files: /php-src/ext/splspl_array.c Log: Fix working with ArrayObjects which contain arrays. http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_array.c?r1=1.113r2=1.114diff_format=u Index: php-src/ext/spl/spl_array.c diff -u php-src/ext/spl/spl_array.c:1.113 php-src/ext/spl/spl_array.c:1.114 --- php-src/ext/spl/spl_array.c:1.113 Sun Oct 8 10:50:19 2006 +++ php-src/ext/spl/spl_array.c Thu Oct 19 22:20:44 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spl_array.c,v 1.113 2006/10/08 10:50:19 bjori Exp $ */ +/* $Id: spl_array.c,v 1.114 2006/10/19 22:20:44 pollita Exp $ */ #ifdef HAVE_CONFIG_H # include config.h @@ -300,6 +300,8 @@ static zval *spl_array_read_dimension_ex(int check_inherited, zval *object, zval *offset, int type TSRMLS_DC) /* {{{ */ { + zval **ret; + if (check_inherited) { spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC); if (intern-fptr_offset_get) { @@ -316,7 +318,30 @@ return EG(uninitialized_zval_ptr); } } - return *spl_array_get_dimension_ptr_ptr(check_inherited, object, offset, type TSRMLS_CC); + ret = spl_array_get_dimension_ptr_ptr(check_inherited, object, offset, type TSRMLS_CC); + + /* When in a write context, +* ZE has to be fooled into thinking this is in a reference set +* by separating (if necessary) and returning as an is_ref=1 zval (even if refcount == 1) */ + if ((type == BP_VAR_W || type == BP_VAR_RW) !(*ret)-is_ref) { + if ((*ret)-refcount 1) { + zval *newval; + + /* Separate */ + MAKE_STD_ZVAL(newval); + *newval = **ret; + zval_copy_ctor(newval); + newval-refcount = 1; + + /* Replace */ + (*ret)-refcount--; + *ret = newval; + } + + (*ret)-is_ref = 1; + } + + return *ret; } /* }}} */ static zval *spl_array_read_dimension(zval *object, zval *offset, int type TSRMLS_DC) /* {{{ */ -- 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 configure.in /main php_version.h
iliaa Fri Oct 20 01:51:07 2006 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS configure.in /php-src/main php_version.h Log: 5.2.0RC6 http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.311r2=1.2027.2.547.2.312diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.311 php-src/NEWS:1.2027.2.547.2.312 --- php-src/NEWS:1.2027.2.547.2.311 Wed Oct 18 23:47:33 2006 +++ php-src/NEWSFri Oct 20 01:51:07 2006 @@ -1,6 +1,6 @@ PHPNEWS ||| -12 Oct 2006, PHP 5.2.0RC6 +19 Oct 2006, PHP 5.2.0RC6 - Fixed invalid read in imagecreatefrompng when an empty file is given (Pierre, Tony) - Fixed bug #39140 (Uncaught exception may cause crash). (Dmitry) http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.579.2.52.2.21r2=1.579.2.52.2.22diff_format=u Index: php-src/configure.in diff -u php-src/configure.in:1.579.2.52.2.21 php-src/configure.in:1.579.2.52.2.22 --- php-src/configure.in:1.579.2.52.2.21Fri Oct 6 21:36:07 2006 +++ php-src/configure.inFri Oct 20 01:51:07 2006 @@ -1,4 +1,4 @@ - ## $Id: configure.in,v 1.579.2.52.2.21 2006/10/06 21:36:07 iliaa Exp $ -*- autoconf -*- + ## $Id: configure.in,v 1.579.2.52.2.22 2006/10/20 01:51:07 iliaa Exp $ -*- autoconf -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -44,7 +44,7 @@ MAJOR_VERSION=5 MINOR_VERSION=2 RELEASE_VERSION=0 -EXTRA_VERSION=RC6-dev +EXTRA_VERSION=RC6 PHP_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION PHP_VERSION_ID=`expr [$]MAJOR_VERSION \* 1 + [$]MINOR_VERSION \* 100 + [$]RELEASE_VERSION` http://cvs.php.net/viewvc.cgi/php-src/main/php_version.h?r1=1.112.2.37.2.12r2=1.112.2.37.2.13diff_format=u Index: php-src/main/php_version.h diff -u php-src/main/php_version.h:1.112.2.37.2.12 php-src/main/php_version.h:1.112.2.37.2.13 --- php-src/main/php_version.h:1.112.2.37.2.12 Fri Oct 6 21:36:07 2006 +++ php-src/main/php_version.h Fri Oct 20 01:51:07 2006 @@ -3,6 +3,6 @@ #define PHP_MAJOR_VERSION 5 #define PHP_MINOR_VERSION 2 #define PHP_RELEASE_VERSION 0 -#define PHP_EXTRA_VERSION RC6-dev -#define PHP_VERSION 5.2.0RC6-dev +#define PHP_EXTRA_VERSION RC6 +#define PHP_VERSION 5.2.0RC6 #define PHP_VERSION_ID 50200 -- 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) /tests/classes abstract_static.phpt
iliaa Fri Oct 20 02:44:26 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/tests/classes abstract_static.phpt Log: Make use of abstract methods be E_STRICT rather then E_ERROR http://cvs.php.net/viewvc.cgi/php-src/tests/classes/abstract_static.phpt?r1=1.3.6.2r2=1.3.6.3diff_format=u Index: php-src/tests/classes/abstract_static.phpt diff -u php-src/tests/classes/abstract_static.phpt:1.3.6.2 php-src/tests/classes/abstract_static.phpt:1.3.6.3 --- php-src/tests/classes/abstract_static.phpt:1.3.6.2 Mon Jul 17 10:08:17 2006 +++ php-src/tests/classes/abstract_static.phpt Fri Oct 20 02:44:26 2006 @@ -31,4 +31,6 @@ --EXPECTF-- Call to function show() -Fatal error: Static function fail::func() cannot be abstract in %s on line %d +Strict Standards: Static function fail::func() should not be abstract in %stests/classes/abstract_static.php(%d) : eval()'d code on line %d + +Fatal error: Class fail contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (fail::func) in %s/tests/classes/abstract_static.php(%d) : eval()'d code on line %d -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php