[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/oci8/tests/null_byte_1.phpt trunk/ext/oci8/tests/null_byte_1.phpt
sixd Tue, 14 Jun 2011 20:04:18 + Revision: http://svn.php.net/viewvc?view=revisionrevision=312169 Log: Improve cross version compat Changed paths: U php/php-src/branches/PHP_5_4/ext/oci8/tests/null_byte_1.phpt U php/php-src/trunk/ext/oci8/tests/null_byte_1.phpt Modified: php/php-src/branches/PHP_5_4/ext/oci8/tests/null_byte_1.phpt === --- php/php-src/branches/PHP_5_4/ext/oci8/tests/null_byte_1.phpt 2011-06-14 20:03:26 UTC (rev 312168) +++ php/php-src/branches/PHP_5_4/ext/oci8/tests/null_byte_1.phpt 2011-06-14 20:04:18 UTC (rev 312169) @@ -1,7 +1,12 @@ --TEST-- Protect against null bytes in LOB filenames --SKIPIF-- -?php if (!extension_loaded('oci8')) die (skip no oci8 extension); ? +?php +if (!extension_loaded('oci8')) +die (skip no oci8 extension); +if (PHP_MAJOR_VERSION 5 || (PHP_MAJOR_VERSION == 5 PHP_MINOR_VERSION 4)) +die (skip Test only valid for PHP 5.4 onwards); +? --INI-- display_errors = On error_reporting = E_WARNING Modified: php/php-src/trunk/ext/oci8/tests/null_byte_1.phpt === --- php/php-src/trunk/ext/oci8/tests/null_byte_1.phpt 2011-06-14 20:03:26 UTC (rev 312168) +++ php/php-src/trunk/ext/oci8/tests/null_byte_1.phpt 2011-06-14 20:04:18 UTC (rev 312169) @@ -1,7 +1,12 @@ --TEST-- Protect against null bytes in LOB filenames --SKIPIF-- -?php if (!extension_loaded('oci8')) die (skip no oci8 extension); ? +?php +if (!extension_loaded('oci8')) +die (skip no oci8 extension); +if (PHP_MAJOR_VERSION 5 || (PHP_MAJOR_VERSION == 5 PHP_MINOR_VERSION 4)) +die (skip Test only valid for PHP 5.4 onwards); +? --INI-- display_errors = On error_reporting = E_WARNING @@ -11,7 +16,6 @@ // See http://news.php.net/php.internals/50202 // http://svn.php.net/viewvc?view=revisionrevision=311870 - require(dirname(__FILE__).'/connect.inc'); // Run Test -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/oci8/tests/null_byte_1.phpt trunk/ext/oci8/tests/null_byte_1.phpt
sixd Tue, 07 Jun 2011 20:58:08 + Revision: http://svn.php.net/viewvc?view=revisionrevision=311900 Log: Update tests to match Felipe's null byte arg parsing change Changed paths: U php/php-src/branches/PHP_5_4/ext/oci8/tests/null_byte_1.phpt U php/php-src/trunk/ext/oci8/tests/null_byte_1.phpt Modified: php/php-src/branches/PHP_5_4/ext/oci8/tests/null_byte_1.phpt === --- php/php-src/branches/PHP_5_4/ext/oci8/tests/null_byte_1.phpt 2011-06-07 20:35:58 UTC (rev 311899) +++ php/php-src/branches/PHP_5_4/ext/oci8/tests/null_byte_1.phpt 2011-06-07 20:58:08 UTC (rev 311900) @@ -1,5 +1,5 @@ --TEST-- -Protect against null bytes in LOB filenames (http://news.php.net/php.internals/50202) +Protect against null bytes in LOB filenames --SKIPIF-- ?php if (!extension_loaded('oci8')) die (skip no oci8 extension); ? --INI-- @@ -8,6 +8,9 @@ --FILE-- ?php +// See http://news.php.net/php.internals/50202 +// http://svn.php.net/viewvc?view=revisionrevision=311870 + require(dirname(__FILE__).'/connect.inc'); // Run Test @@ -29,10 +32,10 @@ --EXPECTF-- Test 1: Import -Warning: OCI-Lob::savefile(): Filename cannot contain null bytes in %snull_byte_1.php on line %d -bool(false) +Warning: OCI-Lob::savefile() expects parameter 1 to be valid path, string given in %snull_byte_1.php on line %d +NULL Test 2: Export -Warning: OCI-Lob::export(): Filename cannot contain null bytes in %snull_byte_1.php on line %d -bool(false) +Warning: OCI-Lob::export() expects parameter 1 to be valid path, string given in %snull_byte_1.php on line %d +NULL ===DONE=== Modified: php/php-src/trunk/ext/oci8/tests/null_byte_1.phpt === --- php/php-src/trunk/ext/oci8/tests/null_byte_1.phpt 2011-06-07 20:35:58 UTC (rev 311899) +++ php/php-src/trunk/ext/oci8/tests/null_byte_1.phpt 2011-06-07 20:58:08 UTC (rev 311900) @@ -1,5 +1,5 @@ --TEST-- -Protect against null bytes in LOB filenames (http://news.php.net/php.internals/50202) +Protect against null bytes in LOB filenames --SKIPIF-- ?php if (!extension_loaded('oci8')) die (skip no oci8 extension); ? --INI-- @@ -8,6 +8,10 @@ --FILE-- ?php +// See http://news.php.net/php.internals/50202 +// http://svn.php.net/viewvc?view=revisionrevision=311870 + + require(dirname(__FILE__).'/connect.inc'); // Run Test @@ -29,10 +33,10 @@ --EXPECTF-- Test 1: Import -Warning: OCI-Lob::savefile(): Filename cannot contain null bytes in %snull_byte_1.php on line %d -bool(false) +Warning: OCI-Lob::savefile() expects parameter 1 to be valid path, string given in %snull_byte_1.php on line %d +NULL Test 2: Export -Warning: OCI-Lob::export(): Filename cannot contain null bytes in %snull_byte_1.php on line %d -bool(false) +Warning: OCI-Lob::export() expects parameter 1 to be valid path, string given in %snull_byte_1.php on line %d +NULL ===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/oci8/tests/null_byte_1.phpt trunk/ext/oci8/tests/null_byte_1.phpt
Hi Chris 2011/6/7 Christopher Jones s...@php.net: -Warning: OCI-Lob::savefile(): Filename cannot contain null bytes in %snull_byte_1.php on line %d -bool(false) +Warning: OCI-Lob::savefile() expects parameter 1 to be valid path, string given in %snull_byte_1.php on line %d +NULL Just a note here unrelated to this patch but the change; wouldn't we want the error message to say to be A valid path to be more grammatically correct? -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/oci8/tests/null_byte_1.phpt trunk/ext/oci8/tests/null_byte_1.phpt
On 06/07/2011 02:26 PM, Kalle Sommer Nielsen wrote: Hi Chris 2011/6/7 Christopher Joness...@php.net: -Warning: OCI-Lob::savefile(): Filename cannot contain null bytes in %snull_byte_1.php on line %d -bool(false) +Warning: OCI-Lob::savefile() expects parameter 1 to be valid path, string given in %snull_byte_1.php on line %d +NULL Just a note here unrelated to this patch but the change; wouldn't we want the error message to say to be A valid path to be more grammatically correct? Hi Kalle, Yes, I noticed that issue. I decided to sync the logs with Felipe's code change first and then bring up the message text at an appropriate time. Chris -- Email: christopher.jo...@oracle.com Tel: +1 650 506 8630 Blog: http://blogs.oracle.com/opal/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php