[PHP-CVS] cvs: php-src /ext/dom/tests DOMCharacterData_appendData_error_001.phpt DOMCharacterData_deleteData_basic_001.phpt DOMCharacterData_deleteData_error_001.phpt DOMCharacterData_deleteData_error
ericstewart Mon May 25 06:07:39 2009 UTC Modified files: /php-src/ext/dom/tests DOMCharacterData_appendData_error_001.phpt DOMCharacterData_deleteData_basic_001.phpt DOMCharacterData_deleteData_error_001.phpt DOMCharacterData_deleteData_error_002.phpt DOMCharacterData_insertData_error_001.phpt DOMCharacterData_replaceData_error_001.phpt DOMComment_construct_error_001.phpt DOMDocumentFragment_appendXML_basic_001.phpt DOMDocumentFragment_appendXML_error_001.phpt DOMDocumentFragment_construct_basic_001.phpt DOMDocumentFragment_construct_error_001.phpt Log: Add the following new tests: DOMCharacterData::appendData() with no arguments. DOMCharacterData::deleteData() with count exceeding string size. DOMCharacterData::deleteData() with no arguments. DOMCharacterData::deleteData() with offset exceeding string size. DOMCharacterData::insertData() with no arguments. DOMCharacterData::replaceData() with no arguments. DOMComment::__construct() with more arguments than acceptable. DOMDocumentFragment::__construct(). DOMDocumentFragment::__construct() with too many errors. DOMDocumentFragment::appendXML() with no arguments. DOMDocumentFragment::appendXML() with children with properties. http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMCharacterData_appendData_error_001.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/dom/tests/DOMCharacterData_appendData_error_001.phpt diff -u /dev/null php-src/ext/dom/tests/DOMCharacterData_appendData_error_001.phpt:1.2 --- /dev/null Mon May 25 06:07:39 2009 +++ php-src/ext/dom/tests/DOMCharacterData_appendData_error_001.phptMon May 25 06:07:39 2009 @@ -0,0 +1,19 @@ +--TEST-- +DOMCharacterData::appendData() with no arguments. +--CREDITS-- +Eric Stewart +# TestFest Atlanta 2009-05-24 +--SKIPIF-- + +--FILE-- +createElement('root'); +$document->appendChild($root); + +$cdata = $document->createCDATASection('test'); +$root->appendChild($cdata); +$cdata->appendData(); +?> +--EXPECTF-- +Warning: DOMCharacterData::appendData() expects exactly 1 parameter, 0 given in %s on line %d \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMCharacterData_deleteData_basic_001.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/dom/tests/DOMCharacterData_deleteData_basic_001.phpt diff -u /dev/null php-src/ext/dom/tests/DOMCharacterData_deleteData_basic_001.phpt:1.2 --- /dev/null Mon May 25 06:07:39 2009 +++ php-src/ext/dom/tests/DOMCharacterData_deleteData_basic_001.phptMon May 25 06:07:39 2009 @@ -0,0 +1,20 @@ +--TEST-- +DOMCharacterData::deleteData() with count exceeding string size. +--CREDITS-- +Eric Lee Stewart +# TestFest Atlanta 2009-05-24 +--SKIPIF-- + +--FILE-- +createElement('root'); +$document->appendChild($root); + +$cdata = $document->createCDATASection('test'); +$root->appendChild($cdata); +$cdata->deleteData(1, 10); +var_dump($cdata->data); +?> +--EXPECTF-- +%unicode|string%(%d) "t" \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMCharacterData_deleteData_error_001.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/dom/tests/DOMCharacterData_deleteData_error_001.phpt diff -u /dev/null php-src/ext/dom/tests/DOMCharacterData_deleteData_error_001.phpt:1.2 --- /dev/null Mon May 25 06:07:39 2009 +++ php-src/ext/dom/tests/DOMCharacterData_deleteData_error_001.phptMon May 25 06:07:39 2009 @@ -0,0 +1,19 @@ +--TEST-- +DOMCharacterData::deleteData() with no arguments. +--CREDITS-- +Eric Lee Stewart +# TestFest Atlanta 2009-05-24 +--SKIPIF-- + +--FILE-- +createElement('root'); +$document->appendChild($root); + +$cdata = $document->createCDATASection('test'); +$root->appendChild($cdata); +$cdata->deleteData(); +?> +--EXPECTF-- +Warning: DOMCharacterData::deleteData() expects exactly 2 parameters, 0 given in %s on line %d \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMCharacterData_deleteData_error_002.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/dom/tests/DOMCharacterData_deleteData_error_002.phpt diff -u /dev/null php-src/ext/dom/tests/DOMCharacterData_deleteData_error_002.phpt:1.2 --- /dev/null Mon May 25 06:07:39 2009 +++ php-src/ext/dom/tests/DOMCharacterData_deleteData_error_002.phptMon May 25 06:07:39 2009 @@ -0,0 +1,23 @@ +--TEST-- +DOMCharacterData::deleteData() with offset exceeding string size. +--CREDITS-- +Eric Lee Stewart +# TestFest Atlanta 2009-05-24 +--SKIPIF-- + +--FILE-- +createElement('root'); +$document->appendChild($root); + +$cdata = $document->createCDATASection('test'); +$root->appendChild($cdata); +$cdata->deleteData(5, 1); +?> +--
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/dom/tests DOMCharacterData_appendData_error_001.phpt DOMCharacterData_deleteData_basic_001.phpt DOMCharacterData_deleteData_error_001.phpt DOMCharacterData_deleteD
ericstewart Mon May 25 06:03:41 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/dom/tests DOMCharacterData_appendData_error_001.phpt DOMCharacterData_deleteData_basic_001.phpt DOMCharacterData_deleteData_error_001.phpt DOMCharacterData_deleteData_error_002.phpt DOMCharacterData_insertData_error_001.phpt DOMCharacterData_replaceData_error_001.phpt DOMComment_construct_error_001.phpt DOMDocumentFragment_appendXML_basic_001.phpt DOMDocumentFragment_appendXML_error_001.phpt DOMDocumentFragment_construct_basic_001.phpt DOMDocumentFragment_construct_error_001.phpt Log: Add the following new tests: DOMCharacterData::appendData() with no arguments. DOMCharacterData::deleteData() with count exceeding string size. DOMCharacterData::deleteData() with no arguments. DOMCharacterData::deleteData() with offset exceeding string size. DOMCharacterData::insertData() with no arguments. DOMCharacterData::replaceData() with no arguments. DOMComment::__construct() with more arguments than acceptable. DOMDocumentFragment::__construct(). DOMDocumentFragment::__construct() with too many errors. DOMDocumentFragment::appendXML() with no arguments. DOMDocumentFragment::appendXML() with children with properties. http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMCharacterData_appendData_error_001.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMCharacterData_appendData_error_001.phpt +++ php-src/ext/dom/tests/DOMCharacterData_appendData_error_001.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMCharacterData_deleteData_basic_001.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMCharacterData_deleteData_basic_001.phpt +++ php-src/ext/dom/tests/DOMCharacterData_deleteData_basic_001.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMCharacterData_deleteData_error_001.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMCharacterData_deleteData_error_001.phpt +++ php-src/ext/dom/tests/DOMCharacterData_deleteData_error_001.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMCharacterData_deleteData_error_002.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMCharacterData_deleteData_error_002.phpt +++ php-src/ext/dom/tests/DOMCharacterData_deleteData_error_002.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMCharacterData_insertData_error_001.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMCharacterData_insertData_error_001.phpt +++ php-src/ext/dom/tests/DOMCharacterData_insertData_error_001.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMCharacterData_replaceData_error_001.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMCharacterData_replaceData_error_001.phpt +++ php-src/ext/dom/tests/DOMCharacterData_replaceData_error_001.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMComment_construct_error_001.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMComment_construct_error_001.phpt +++ php-src/ext/dom/tests/DOMComment_construct_error_001.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMDocumentFragment_appendXML_basic_001.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMDocumentFragment_appendXML_basic_001.phpt +++ php-src/ext/dom/tests/DOMDocumentFragment_appendXML_basic_001.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMDocumentFragment_appendXML_error_001.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMDocumentFragment_appendXML_error_001.phpt +++ php-src/ext/dom/tests/DOMDocumentFragment_appendXML_error_001.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMDocumentFragment_construct_basic_001.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMDocumentFragment_construct_basic_001.phpt +++ php-src/ext/dom/tests/DOMDocumentFragment_construct_basic_001.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMDocumentFragment_construct_error_001.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMDocumentFragment_construct_error_001.phpt +++ php-src/ext/dom/tests/DOMDocumentFragment_construct_error_001.phpt -- 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/dom/tests DOMCharacterData_appendData_error_001.phpt DOMCharacterData_deleteData_basic_001.phpt DOMCharacterData_deleteData_error_001.phpt DOMCharacterData_deleteD
ericstewart Mon May 25 05:58:46 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/dom/tests DOMCharacterData_appendData_error_001.phpt DOMCharacterData_deleteData_basic_001.phpt DOMCharacterData_deleteData_error_001.phpt DOMCharacterData_deleteData_error_002.phpt DOMCharacterData_insertData_error_001.phpt DOMCharacterData_replaceData_error_001.phpt DOMComment_construct_error_001.phpt DOMDocumentFragment_appendXML_basic_001.phpt DOMDocumentFragment_appendXML_error_001.phpt DOMDocumentFragment_construct_basic_001.phpt DOMDocumentFragment_construct_error_001.phpt Log: Add the following new tests: DOMCharacterData::appendData() with no arguments. DOMCharacterData::deleteData() with count exceeding string size. DOMCharacterData::deleteData() with no arguments. DOMCharacterData::deleteData() with offset exceeding string size. DOMCharacterData::insertData() with no arguments. DOMCharacterData::replaceData() with no arguments. DOMComment::__construct() with more arguments than acceptable. DOMDocumentFragment::__construct(). DOMDocumentFragment::__construct() with too many errors. DOMDocumentFragment::appendXML() with no arguments. DOMDocumentFragment::appendXML() with children with properties. http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMCharacterData_appendData_error_001.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMCharacterData_appendData_error_001.phpt +++ php-src/ext/dom/tests/DOMCharacterData_appendData_error_001.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMCharacterData_deleteData_basic_001.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMCharacterData_deleteData_basic_001.phpt +++ php-src/ext/dom/tests/DOMCharacterData_deleteData_basic_001.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMCharacterData_deleteData_error_001.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMCharacterData_deleteData_error_001.phpt +++ php-src/ext/dom/tests/DOMCharacterData_deleteData_error_001.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMCharacterData_deleteData_error_002.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMCharacterData_deleteData_error_002.phpt +++ php-src/ext/dom/tests/DOMCharacterData_deleteData_error_002.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMCharacterData_insertData_error_001.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMCharacterData_insertData_error_001.phpt +++ php-src/ext/dom/tests/DOMCharacterData_insertData_error_001.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMCharacterData_replaceData_error_001.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMCharacterData_replaceData_error_001.phpt +++ php-src/ext/dom/tests/DOMCharacterData_replaceData_error_001.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMComment_construct_error_001.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMComment_construct_error_001.phpt +++ php-src/ext/dom/tests/DOMComment_construct_error_001.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMDocumentFragment_appendXML_basic_001.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMDocumentFragment_appendXML_basic_001.phpt +++ php-src/ext/dom/tests/DOMDocumentFragment_appendXML_basic_001.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMDocumentFragment_appendXML_error_001.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMDocumentFragment_appendXML_error_001.phpt +++ php-src/ext/dom/tests/DOMDocumentFragment_appendXML_error_001.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMDocumentFragment_construct_basic_001.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMDocumentFragment_construct_basic_001.phpt +++ php-src/ext/dom/tests/DOMDocumentFragment_construct_basic_001.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMDocumentFragment_construct_error_001.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMDocumentFragment_construct_error_001.phpt +++ php-src/ext/dom/tests/DOMDocumentFragment_construct_error_001.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/phar phar_object.c /ext/phar/tests/tar phar_convert_phar4.phpt
cellog Sun May 24 18:50:58 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/phar/tests/tar phar_convert_phar4.phpt Modified files: /php-srcNEWS /php-src/ext/phar phar_object.c Log: MFH: fix potential segfault when converting phars with metadata to other formats, add test http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.608&r2=1.2027.2.547.2.965.2.609&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.608 php-src/NEWS:1.2027.2.547.2.965.2.609 --- php-src/NEWS:1.2027.2.547.2.965.2.608 Tue May 19 18:32:25 2009 +++ php-src/NEWSSun May 24 18:50:57 2009 @@ -19,6 +19,8 @@ PDO_PGSQL). (Matteo) - Fixed bug #38802 (max_redirects and ignore_errors). (patch by datib...@php.net) +- Fixed potential segfault with converting phars containing metadata to other + formats (Greg). 07 May 2009, PHP 5.3.0 RC 2 http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar_object.c?r1=1.266.2.61&r2=1.266.2.62&diff_format=u Index: php-src/ext/phar/phar_object.c diff -u php-src/ext/phar/phar_object.c:1.266.2.61 php-src/ext/phar/phar_object.c:1.266.2.62 --- php-src/ext/phar/phar_object.c:1.266.2.61 Tue May 5 01:41:51 2009 +++ php-src/ext/phar/phar_object.c Sun May 24 18:50:58 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: phar_object.c,v 1.266.2.61 2009/05/05 01:41:51 cellog Exp $ */ +/* $Id: phar_object.c,v 1.266.2.62 2009/05/24 18:50:58 cellog Exp $ */ #include "phar_internal.h" #include "func_interceptors.h" @@ -2252,6 +2252,22 @@ phar->is_temporary_alias = source->is_temporary_alias; phar->alias = source->alias; + if (source->metadata) { + zval *t; + + t = source->metadata; + ALLOC_ZVAL(phar->metadata); + *phar->metadata = *t; + zval_copy_ctor(phar->metadata); +#if PHP_VERSION_ID < 50300 + phar->metadata->refcount = 1; +#else + Z_SET_REFCOUNT_P(phar->metadata, 1); +#endif + + phar->metadata_len = 0; + } + /* first copy each file's uncompressed contents to a temporary file and set per-file flags */ for (zend_hash_internal_pointer_reset(&source->manifest); SUCCESS == zend_hash_has_more_elements(&source->manifest); zend_hash_move_forward(&source->manifest)) { http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/tar/phar_convert_phar4.phpt?view=markup&rev=1.1 Index: php-src/ext/phar/tests/tar/phar_convert_phar4.phpt +++ php-src/ext/phar/tests/tar/phar_convert_phar4.phpt --TEST-- Phar::convertToPhar() with global metadata --SKIPIF-- --INI-- phar.require_hash=0 phar.readonly=0 --FILE-- setMetadata('hi'); $phar->stopBuffering(); var_dump($phar->isFileFormat(Phar::TAR)); var_dump(strlen($phar->getStub())); var_dump($phar->getMetadata()); $phar = $phar->convertToExecutable(Phar::TAR); var_dump($phar->isFileFormat(Phar::TAR)); var_dump($phar->getStub()); var_dump($phar->getMetadata()); $phar['a'] = 'hi there'; $phar = $phar->convertToExecutable(Phar::PHAR, Phar::GZ); var_dump($phar->isFileFormat(Phar::PHAR)); var_dump($phar->isCompressed()); var_dump(strlen($phar->getStub())); var_dump($phar->getMetadata()); copy($fname . '.gz', $fname2); $phar = new Phar($fname2); var_dump($phar->isFileFormat(Phar::PHAR)); var_dump($phar->isCompressed() == Phar::GZ); var_dump(strlen($phar->getStub())); var_dump($phar->getMetadata()); ?> ===DONE=== --CLEAN-- --EXPECT-- bool(false) int(6683) string(2) "hi" bool(true) string(60) "http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/phar phar_object.c /ext/phar/tests/tar phar_convert_phar4.phpt
cellog Sun May 24 18:50:38 2009 UTC Added files: /php-src/ext/phar/tests/tar phar_convert_phar4.phpt Modified files: /php-src/ext/phar phar_object.c Log: fix potential segfault when converting phars with metadata to other formats, add test http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar_object.c?r1=1.297&r2=1.298&diff_format=u Index: php-src/ext/phar/phar_object.c diff -u php-src/ext/phar/phar_object.c:1.297 php-src/ext/phar/phar_object.c:1.298 --- php-src/ext/phar/phar_object.c:1.297Tue May 5 01:42:06 2009 +++ php-src/ext/phar/phar_object.c Sun May 24 18:50:37 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: phar_object.c,v 1.297 2009/05/05 01:42:06 cellog Exp $ */ +/* $Id: phar_object.c,v 1.298 2009/05/24 18:50:37 cellog Exp $ */ #include "phar_internal.h" #include "func_interceptors.h" @@ -2252,6 +2252,22 @@ phar->is_temporary_alias = source->is_temporary_alias; phar->alias = source->alias; + if (source->metadata) { + zval *t; + + t = source->metadata; + ALLOC_ZVAL(phar->metadata); + *phar->metadata = *t; + zval_copy_ctor(phar->metadata); +#if PHP_VERSION_ID < 50300 + phar->metadata->refcount = 1; +#else + Z_SET_REFCOUNT_P(phar->metadata, 1); +#endif + + phar->metadata_len = 0; + } + /* first copy each file's uncompressed contents to a temporary file and set per-file flags */ for (zend_hash_internal_pointer_reset(&source->manifest); SUCCESS == zend_hash_has_more_elements(&source->manifest); zend_hash_move_forward(&source->manifest)) { http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/tar/phar_convert_phar4.phpt?view=markup&rev=1.1 Index: php-src/ext/phar/tests/tar/phar_convert_phar4.phpt +++ php-src/ext/phar/tests/tar/phar_convert_phar4.phpt --TEST-- Phar::convertToPhar() with global metadata --SKIPIF-- --INI-- phar.require_hash=0 phar.readonly=0 --FILE-- setMetadata('hi'); $phar->stopBuffering(); var_dump($phar->isFileFormat(Phar::TAR)); var_dump(strlen($phar->getStub())); var_dump($phar->getMetadata()); $phar = $phar->convertToExecutable(Phar::TAR); var_dump($phar->isFileFormat(Phar::TAR)); var_dump($phar->getStub()); var_dump($phar->getMetadata()); $phar['a'] = 'hi there'; $phar = $phar->convertToExecutable(Phar::PHAR, Phar::GZ); var_dump($phar->isFileFormat(Phar::PHAR)); var_dump($phar->isCompressed()); var_dump(strlen($phar->getStub())); var_dump($phar->getMetadata()); copy($fname . '.gz', $fname2); $phar = new Phar($fname2); var_dump($phar->isFileFormat(Phar::PHAR)); var_dump($phar->isCompressed() == Phar::GZ); var_dump(strlen($phar->getStub())); var_dump($phar->getMetadata()); ?> ===DONE=== --CLEAN-- --EXPECT-- bool(false) int(6683) string(2) "hi" bool(true) string(60) "http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/phar/tests/tar tar_nohash.phpt
cellog Sun May 24 18:47:54 2009 UTC Modified files: /php-src/ext/phar/tests/tar tar_nohash.phpt Log: add missing test http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/tar/tar_nohash.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/tar/tar_nohash.phpt diff -u /dev/null php-src/ext/phar/tests/tar/tar_nohash.phpt:1.2 --- /dev/null Sun May 24 18:47:54 2009 +++ php-src/ext/phar/tests/tar/tar_nohash.phpt Sun May 24 18:47:54 2009 @@ -0,0 +1,23 @@ +--TEST-- +Phar: tar archive, require_hash=1, should not error out +--SKIPIF-- + + + +--INI-- +phar.readonly=1 +phar.require_hash=1 +--FILE-- +getStub()); +} catch (Exception $e) { + echo $e->getMessage()."\n"; +} + +?> +===DONE=== +--EXPECT-- +string(0) "" +===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/pdo_firebird config.m4
This changes the default directory of the lib, so I don't think it's suitable for a bugfix-only branch. Anyway, noone complained about this problem (except myself), although it has been around forever. Nuno - Original Message - And PHP_5_2 ..? Nuno Lopes kirjoitti: nlopess Sat May 23 13:52:53 2009 UTC Modified files: /php-src/ext/pdo_firebird config.m4 Log: MFB: fix compilation of pdo_firebird and intl extension with ld --as-needed http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_firebird/config.m4?r1=1.11&r2=1.12&diff_format=u Index: php-src/ext/pdo_firebird/config.m4 diff -u php-src/ext/pdo_firebird/config.m4:1.11 php-src/ext/pdo_firebird/config.m4:1.12 --- php-src/ext/pdo_firebird/config.m4:1.11 Fri Jul 25 13:38:40 2008 +++ php-src/ext/pdo_firebird/config.m4 Sat May 23 13:52:53 2009 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.11 2008/07/25 13:38:40 jani Exp $ +dnl $Id: config.m4,v 1.12 2009/05/23 13:52:53 nlopess Exp $ dnl PHP_ARG_WITH(pdo-firebird,for Firebird support for PDO, @@ -13,11 +13,13 @@ fi if test "$PHP_PDO_FIREBIRD" = "yes"; then -FIREBIRD_INCDIR=/opt/firebird/include -FIREBIRD_LIBDIR=/opt/firebird/lib +FIREBIRD_INCDIR= +FIREBIRD_LIBDIR= +FIREBIRD_LIBDIR_FLAG= else FIREBIRD_INCDIR=$PHP_PDO_FIREBIRD/include FIREBIRD_LIBDIR=$PHP_PDO_FIREBIRD/$PHP_LIBDIR +FIREBIRD_LIBDIR_FLAG=-L$FIREBIRD_LIBDIR fi PHP_CHECK_LIBRARY(fbclient, isc_detach_database, @@ -34,13 +36,13 @@ ], [ AC_MSG_ERROR([libfbclient, libgds or libib_util not found! Check config.log for more information.]) ], [ --L$FIREBIRD_LIBDIR +$FIREBIRD_LIBDIR_FLAG ]) ], [ - -L$FIREBIRD_LIBDIR + $FIREBIRD_LIBDIR_FLAG ]) ], [ --L$FIREBIRD_LIBDIR +$FIREBIRD_LIBDIR_FLAG ]) PHP_CHECK_PDO_INCLUDES -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard file.c http_fopen_wrapper.c /ext/standard/tests/file fgetcsv_variation14.phpt fgetcsv_variation21.phpt
Should have that soon, code is completely different there Ilia Alshanetsky CIO/CSO Centah Inc. On 24-May-09, at 12:07, Jani Taskinen wrote: And the HEAD..? --Jani Ilia Alshanetsky kirjoitti: iliaaSun May 24 16:02:22 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standardfile.c http_fopen_wrapper.c /php- src/ext/standard/tests/file fgetcsv_variation14.phpt fgetcsv_variation21.phpt Log: Improve fix for bug #48313 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard file.c http_fopen_wrapper.c /ext/standard/tests/file fgetcsv_variation14.phpt fgetcsv_variation21.phpt
And the HEAD..? --Jani Ilia Alshanetsky kirjoitti: iliaa Sun May 24 16:02:22 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard file.c http_fopen_wrapper.c /php-src/ext/standard/tests/file fgetcsv_variation14.phpt fgetcsv_variation21.phpt Log: Improve fix for bug #48313 -- 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 file.c http_fopen_wrapper.c /ext/standard/tests/file fgetcsv_variation14.phpt fgetcsv_variation21.phpt
iliaa Sun May 24 16:02:22 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard file.c http_fopen_wrapper.c /php-src/ext/standard/tests/filefgetcsv_variation14.phpt fgetcsv_variation21.phpt Log: Improve fix for bug #48313 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.409.2.6.2.42&r2=1.409.2.6.2.43&diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.409.2.6.2.42 php-src/ext/standard/file.c:1.409.2.6.2.43 --- php-src/ext/standard/file.c:1.409.2.6.2.42 Mon May 18 18:46:06 2009 +++ php-src/ext/standard/file.c Sun May 24 16:02:22 2009 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.409.2.6.2.42 2009/05/18 18:46:06 iliaa Exp $ */ +/* $Id: file.c,v 1.409.2.6.2.43 2009/05/24 16:02:22 iliaa Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -2139,6 +2139,7 @@ size_t temp_len, line_end_len; int inc_len; + zend_bool first_field = 1; /* initialize internal state */ php_mblen(NULL, 0); @@ -2190,6 +2191,11 @@ } quit_loop_1: + if (first_field && bptr == line_end) { + add_next_index_null(return_value); + break; + } + first_field = 0; /* 2. Read field, leaving bptr pointing at start of next field */ if (inc_len != 0 && *bptr == enclosure) { int state = 0; @@ -2384,12 +2390,8 @@ } /* 3. Now pass our field back to php */ - if (comp_end - temp) { - *comp_end = '\0'; - add_next_index_stringl(return_value, temp, comp_end - temp, 1); - } else { - add_next_index_null(return_value); - } + *comp_end = '\0'; + add_next_index_stringl(return_value, temp, comp_end - temp, 1); } while (inc_len > 0); out: http://cvs.php.net/viewvc.cgi/php-src/ext/standard/http_fopen_wrapper.c?r1=1.99.2.12.2.17&r2=1.99.2.12.2.18&diff_format=u Index: php-src/ext/standard/http_fopen_wrapper.c diff -u php-src/ext/standard/http_fopen_wrapper.c:1.99.2.12.2.17 php-src/ext/standard/http_fopen_wrapper.c:1.99.2.12.2.18 --- php-src/ext/standard/http_fopen_wrapper.c:1.99.2.12.2.17Thu May 14 16:15:38 2009 +++ php-src/ext/standard/http_fopen_wrapper.c Sun May 24 16:02:22 2009 @@ -19,7 +19,7 @@ | Sara Golemon | +--+ */ -/* $Id: http_fopen_wrapper.c,v 1.99.2.12.2.17 2009/05/14 16:15:38 lbarnaud Exp $ */ +/* $Id: http_fopen_wrapper.c,v 1.99.2.12.2.18 2009/05/24 16:02:22 iliaa Exp $ */ #include "php.h" #include "php_globals.h" @@ -553,7 +553,8 @@ response_code = 0; } /* when we request only the header, don't fail even on error codes */ - if (options & STREAM_ONLY_GET_HEADERS) { + if ((options & STREAM_ONLY_GET_HEADERS) || + (context && php_stream_context_get_option(context, "http", "ignore_errors", &tmpzval) == SUCCESS && zend_is_true(*tmpzval)) ) { reqok = 1; } switch(response_code) { http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation14.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/standard/tests/file/fgetcsv_variation14.phpt diff -u php-src/ext/standard/tests/file/fgetcsv_variation14.phpt:1.1.2.2 php-src/ext/standard/tests/file/fgetcsv_variation14.phpt:1.1.2.3 --- php-src/ext/standard/tests/file/fgetcsv_variation14.phpt:1.1.2.2Tue Aug 14 14:07:46 2007 +++ php-src/ext/standard/tests/file/fgetcsv_variation14.phptSun May 24 16:02:22 2009 @@ -75,7 +75,7 @@ -- Testing fgetcsv() with file opened using r mode -- array(1) { [0]=> - string(0) "" + NULL } int(1) bool(false) @@ -86,7 +86,7 @@ -- Testing fgetcsv() with file opened using rb mode -- array(1) { [0]=> - string(0) "" + NULL } int(1) bool(false) @@ -97,7 +97,7 @@ -- Testing fgetcsv() with file opened using rt mode -- array(1) { [0]=> - string(0) "" + NULL } int(1) bool(false) @@ -108,7 +108,7 @@ -- Testing fgetcsv() with file opened using r+ mode -- array(1) { [0]=> - string(0) "" + NULL } int(1) bool(false) @@ -119,7 +119,7 @@ -- Testing fgetcsv() with file opened using r+b mode -- array(1) { [0]=> - string(0) "" + NULL } int(1) bool(false) @@ -130,7 +130,7 @@ -- Testing fgetcsv() with file opened using r+t mode -- array(1) { [0]=> - string(0) "" + NULL } int(1) bool(false) @@ -141,7 +141,7 @@ -- Testing
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard file.c /ext/standard/tests/file fgetcsv_variation14.phpt fgetcsv_variation21.phpt
iliaa Sun May 24 16:01:48 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard file.c /php-src/ext/standard/tests/filefgetcsv_variation14.phpt fgetcsv_variation21.phpt Log: MFB: Improve fix for bug #48313 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.409.2.6.2.28.2.34&r2=1.409.2.6.2.28.2.35&diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.409.2.6.2.28.2.34 php-src/ext/standard/file.c:1.409.2.6.2.28.2.35 --- php-src/ext/standard/file.c:1.409.2.6.2.28.2.34 Thu May 21 02:15:03 2009 +++ php-src/ext/standard/file.c Sun May 24 16:01:47 2009 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.409.2.6.2.28.2.34 2009/05/21 02:15:03 jani Exp $ */ +/* $Id: file.c,v 1.409.2.6.2.28.2.35 2009/05/24 16:01:47 iliaa Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -2108,6 +2108,7 @@ char *temp, *tptr, *bptr, *line_end, *limit; size_t temp_len, line_end_len; int inc_len; + zend_bool first_field = 1; /* initialize internal state */ php_mblen(NULL, 0); @@ -2159,6 +2160,11 @@ } quit_loop_1: + if (first_field && bptr == line_end) { + add_next_index_null(return_value); + break; + } + first_field = 0; /* 2. Read field, leaving bptr pointing at start of next field */ if (inc_len != 0 && *bptr == enclosure) { int state = 0; @@ -2355,12 +2361,8 @@ } /* 3. Now pass our field back to php */ - if (comp_end - temp) { - *comp_end = '\0'; - add_next_index_stringl(return_value, temp, comp_end - temp, 1); - } else { - add_next_index_null(return_value); - } + *comp_end = '\0'; + add_next_index_stringl(return_value, temp, comp_end - temp, 1); } while (inc_len > 0); out: http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation14.phpt?r1=1.1.2.2&r2=1.1.2.2.2.1&diff_format=u Index: php-src/ext/standard/tests/file/fgetcsv_variation14.phpt diff -u php-src/ext/standard/tests/file/fgetcsv_variation14.phpt:1.1.2.2 php-src/ext/standard/tests/file/fgetcsv_variation14.phpt:1.1.2.2.2.1 --- php-src/ext/standard/tests/file/fgetcsv_variation14.phpt:1.1.2.2Tue Aug 14 14:07:46 2007 +++ php-src/ext/standard/tests/file/fgetcsv_variation14.phptSun May 24 16:01:48 2009 @@ -75,7 +75,7 @@ -- Testing fgetcsv() with file opened using r mode -- array(1) { [0]=> - string(0) "" + NULL } int(1) bool(false) @@ -86,7 +86,7 @@ -- Testing fgetcsv() with file opened using rb mode -- array(1) { [0]=> - string(0) "" + NULL } int(1) bool(false) @@ -97,7 +97,7 @@ -- Testing fgetcsv() with file opened using rt mode -- array(1) { [0]=> - string(0) "" + NULL } int(1) bool(false) @@ -108,7 +108,7 @@ -- Testing fgetcsv() with file opened using r+ mode -- array(1) { [0]=> - string(0) "" + NULL } int(1) bool(false) @@ -119,7 +119,7 @@ -- Testing fgetcsv() with file opened using r+b mode -- array(1) { [0]=> - string(0) "" + NULL } int(1) bool(false) @@ -130,7 +130,7 @@ -- Testing fgetcsv() with file opened using r+t mode -- array(1) { [0]=> - string(0) "" + NULL } int(1) bool(false) @@ -141,7 +141,7 @@ -- Testing fgetcsv() with file opened using a+ mode -- array(1) { [0]=> - string(0) "" + NULL } int(1) bool(false) @@ -152,7 +152,7 @@ -- Testing fgetcsv() with file opened using a+b mode -- array(1) { [0]=> - string(0) "" + NULL } int(1) bool(false) @@ -163,7 +163,7 @@ -- Testing fgetcsv() with file opened using a+t mode -- array(1) { [0]=> - string(0) "" + NULL } int(1) bool(false) @@ -174,7 +174,7 @@ -- Testing fgetcsv() with file opened using w+ mode -- array(1) { [0]=> - string(0) "" + NULL } int(1) bool(false) @@ -185,7 +185,7 @@ -- Testing fgetcsv() with file opened using w+b mode -- array(1) { [0]=> - string(0) "" + NULL } int(1) bool(false) @@ -196,7 +196,7 @@ -- Testing fgetcsv() with file opened using w+t mode -- array(1) { [0]=> - string(0) "" + NULL } int(1) bool(false) @@ -207,7 +207,7 @@ -- Testing fgetcsv() with file opened using x+ mode -- array(1) { [0]=> - string(0) "" + NULL } int(1) bool(false) @@ -218,7 +218,7 @@ -- Testing fgetcsv() with file opened using x+b mode -- array(1) { [0]=> - string(0) "" + NULL } int(1) bool(false) @@ -229,7 +229,7 @@ -- Testing fgetcsv() with file opened using x+t mode -- array(1) { [0]=> - string(0) "" + NULL } int(1) bool(false) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variatio
Re: [PHP-CVS] cvs: php-src(PHP_5_3) /main SAPI.c SAPI.h main.c php_globals.h /sapi/apache mod_php5.c ZendEngine2 zend_execute.h zend_execute_API.c
Hello, this patch introduced a bug in 5_3/HEAD, the timeout is no longer checked in the shutdown function: set_time_limit(1); register_shutdown_function("plop"); function plop() { while(1); } plop(); doesn't terminate http://patches.colder.ch/php-src/shutdown_timeout-5_3.patch?markup fixes it but I'm not sure it's the right way to do it. Can you please take a look? Thanks. On Tue, Mar 18, 2008 at 11:42 PM, Rasmus Lerdorf wrote: > rasmus Tue Mar 18 21:42:51 2008 UTC > > Modified files: (Branch: PHP_5_3) > /ZendEngine2 zend_execute.h zend_execute_API.c > /php-src/main SAPI.c SAPI.h main.c php_globals.h > /php-src/sapi/apache mod_php5.c > Log: > exit_on_timeout patch > > After the sigsetjmp change, this is patch #2 in an effort to get some > sanity restored to signal handling in PHP. > > This patch does two things. First, it makes it possible to reset the > timeout without resetting the signal handlers. This is important for > cases where an extension may have deferred signals in its MINIT in order > to implement critical sections. It also lays the groundwork for cleaning > up our signal handling and perhaps eventually implementing our own > signal deferring mechanism so we can have true critical sections. > > The second thing this does is to make it possible to terminate the current > child process (only for Apache1 at the moment) on a timeout. There are > a number of extensions that are unhappy about being longjmp'ed out of > and when this happens on a timeout they are left in an inconsistent state. > By turning on exit_on_timeout you can now force the process to terminate > on a timeout which will clean up any hanging locks and/or memory left > hanging after the longjmp. > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- Etienne Kneuss http://www.colder.ch Men never do evil so completely and cheerfully as when they do it from a religious conviction. -- Pascal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php