mirror of
https://github.com/php/php-src.git
synced 2025-01-22 03:34:19 +08:00
fix failing tests
This commit is contained in:
parent
b56c6b24ff
commit
553a08c4e1
@ -12,4 +12,4 @@ $doc = new DOMDocument();
|
||||
$doc->loadHTML();
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: DOMDocument::loadHTML() expects exactly 1 parameter, 0 given in %s on line %d
|
||||
Warning: DOMDocument::loadHTML() expects at least 1 parameter, 0 given in %s on line %d
|
||||
|
@ -23,3 +23,9 @@ var_dump($result);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
Warning: DOMDocument::relaxNGValidate(): I/O warning : failed to load external entity "%s/foo.rng" in %s on line %d
|
||||
|
||||
Warning: DOMDocument::relaxNGValidate(): xmlRelaxNGParse: could not load %s/foo.rng in %s on line %d
|
||||
|
||||
Warning: DOMDocument::relaxNGValidate(): Invalid RelaxNG in %s on line %d
|
||||
bool(false)
|
||||
|
@ -18,6 +18,24 @@ Warning: finfo_open() expects parameter 2 to be a valid path, string given in %s
|
||||
bool(false)
|
||||
resource(%d) of type (file_info)
|
||||
resource(%d) of type (file_info)
|
||||
|
||||
Warning: finfo_open(%s/123): failed to open stream: No such file or directory in %s on line %d
|
||||
|
||||
Warning: finfo_open(%s/123): failed to open stream: No such file or directory in %s on line %d
|
||||
|
||||
Warning: finfo_open(): Failed to load magic database at '%s/123'. in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: finfo_open(%s/1): failed to open stream: No such file or directory in %s on line %d
|
||||
|
||||
Warning: finfo_open(%s/1): failed to open stream: No such file or directory in %s on line %d
|
||||
|
||||
Warning: finfo_open(): Failed to load magic database at '%s/1'. in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: finfo_open(/foo/bar/inexistent): failed to open stream: No such file or directory in %s on line %d
|
||||
|
||||
Warning: finfo_open(/foo/bar/inexistent): failed to open stream: No such file or directory in %s on line %d
|
||||
|
||||
Warning: finfo_open(): Failed to load magic database at '/foo/bar/inexistent'. in %s on line %d
|
||||
bool(false)
|
||||
|
@ -26,6 +26,12 @@ var_dump( new finfo('foobar') );
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
*** Testing finfo_open() : error functionality ***
|
||||
|
||||
Warning: finfo_open(%s/foobarfile): failed to open stream: No such file or directory in %s on line %d
|
||||
|
||||
Warning: finfo_open(%s/foobarfile): failed to open stream: No such file or directory in %s on line %d
|
||||
|
||||
Warning: finfo_open(): Failed to load magic database at '%s/foobarfile'. in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: finfo_open() expects parameter 1 to be long, array given in %s on line %d
|
||||
@ -37,10 +43,10 @@ bool(false)
|
||||
Notice: finfo_open(): Warning: using regular magic file `%s' in %s on line %d
|
||||
resource(%d) of type (file_info)
|
||||
|
||||
Warning: finfo_open() expects parameter 1 to be long, %unicode_string_optional% given in %s on line %d
|
||||
Warning: finfo_open() expects parameter 1 to be long, string given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: finfo::finfo() expects parameter 1 to be long, %unicode_string_optional% given in %s on line %d
|
||||
Warning: finfo::finfo() expects parameter 1 to be long, string given in %s on line %d
|
||||
object(finfo)#%d (%d) {
|
||||
}
|
||||
===DONE===
|
||||
|
@ -32,10 +32,10 @@ var_dump($decoded['To']);
|
||||
string(17) "<foo@example.com>"
|
||||
string(29) "=?ks_c_5601-1987?B?UkU6odk=?="
|
||||
string(33) "=?ks_c_5601-1987?B?UkU6odk=?= Foo"
|
||||
string(32) "=?ks_c_5601-1987?B?UkU6odk=?=Foo"
|
||||
string(33) "=?ks_c_5601-1987?B?UkU6odk=?= Foo"
|
||||
string(18) "<test@example.com>"
|
||||
string(17) "<foo@example.com>"
|
||||
string(29) "=?ks_c_5601-1987?B?UkU6odk=?="
|
||||
string(33) "=?ks_c_5601-1987?B?UkU6odk=?= Foo"
|
||||
string(32) "=?ks_c_5601-1987?B?UkU6odk=?=Foo"
|
||||
string(33) "=?ks_c_5601-1987?B?UkU6odk=?= Foo"
|
||||
string(18) "<test@example.com>"
|
||||
|
@ -34,6 +34,8 @@ string(2) "42"
|
||||
string(20) "a4b3a4f3a4cba4c1a4cf"
|
||||
string(10) "69636f6e76"
|
||||
string(2) "0a"
|
||||
|
||||
Warning: fread(): iconv stream filter ("ISO-2022-JP"=>"EUC-JP"): invalid multibyte sequence in %s on line %d
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
@ -15,7 +15,7 @@ echo mb_ereg_replace($ptr,'$1',$txt,'e');
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in %sbug43301.php(%d) : mbregex replace on line 1
|
||||
Parse error: syntax error, unexpected '1' (T_LNUMBER), expecting variable (T_VARIABLE) or '$' in %sbug43301.php(%d) : mbregex replace on line %d
|
||||
|
||||
Fatal error: mb_ereg_replace(): Failed evaluating code:
|
||||
$1 in %sbug43301.php on line %d
|
||||
|
@ -4,10 +4,12 @@ Test for blowfish compatibility
|
||||
<?php if (!extension_loaded("mcrypt")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
function hex2bin($data) {
|
||||
$len = strlen($data);
|
||||
return pack("H" . $len, $data);
|
||||
}
|
||||
if(!function_exists("hex2bin")) {
|
||||
function hex2bin($data) {
|
||||
$len = strlen($data);
|
||||
return pack("H" . $len, $data);
|
||||
}
|
||||
}
|
||||
|
||||
print "key plain crypt guess stat\n";
|
||||
$null = "\0\0\0\0\0\0\0\0";
|
||||
|
@ -69,7 +69,7 @@ testname
|
||||
<?php
|
||||
var_dump($_POST);
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
array(15) {
|
||||
["name1"]=>
|
||||
string(8) "testname"
|
||||
@ -77,28 +77,28 @@ array(15) {
|
||||
string(8) "testname"
|
||||
["name3"]=>
|
||||
string(8) "testname"
|
||||
["name\\4"]=>
|
||||
["name\4"]=>
|
||||
string(8) "testname"
|
||||
["name\\5"]=>
|
||||
["name\5"]=>
|
||||
string(8) "testname"
|
||||
["name\\\'6"]=>
|
||||
["name\'6"]=>
|
||||
string(8) "testname"
|
||||
["name\\\"7"]=>
|
||||
["name\"7"]=>
|
||||
string(8) "testname"
|
||||
["name\\8"]=>
|
||||
["name\8"]=>
|
||||
string(8) "testname"
|
||||
["name\\9"]=>
|
||||
["name\9"]=>
|
||||
string(8) "testname"
|
||||
["name\'10"]=>
|
||||
["name'10"]=>
|
||||
string(8) "testname"
|
||||
["name\\\"11"]=>
|
||||
["name\"11"]=>
|
||||
string(8) "testname"
|
||||
["name\\12"]=>
|
||||
["name\12"]=>
|
||||
string(8) "testname"
|
||||
["name\\13"]=>
|
||||
["name\13"]=>
|
||||
string(8) "testname"
|
||||
["name\\\'14"]=>
|
||||
["name\'14"]=>
|
||||
string(8) "testname"
|
||||
["name\"15"]=>
|
||||
["name"15"]=>
|
||||
string(8) "testname"
|
||||
}
|
||||
|
@ -3,9 +3,7 @@ Bug #46313 (Magic quotes broke $_FILES)
|
||||
--SKIPIF--
|
||||
<?php if(substr(PHP_OS, 0, 3) != "WIN") die("skip Windows-only test"); ?>
|
||||
--INI--
|
||||
magic_quotes_gpc=1
|
||||
file_uploads=1
|
||||
register_globals=1
|
||||
--POST_RAW--
|
||||
Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
|
||||
-----------------------------20896060251896012921717172737
|
||||
@ -62,66 +60,3 @@ string(%d) "%s"
|
||||
bool(true)
|
||||
Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
|
||||
Warning: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0
|
||||
|
||||
--TEST--
|
||||
Bug #46313 (Magic quotes broke $_FILES)
|
||||
--SKIPIF--
|
||||
<?php if(substr(PHP_OS, 0, 3) != "WIN") die("skip Windows-only test"); ?>
|
||||
--INI--
|
||||
magic_quotes_gpc=1
|
||||
file_uploads=1
|
||||
--POST_RAW--
|
||||
Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
|
||||
-----------------------------20896060251896012921717172737
|
||||
Content-Disposition: form-data; name="o1'file"; filename="o1'file.png"
|
||||
Content-Type: text/plain-file1
|
||||
|
||||
1
|
||||
-----------------------------20896060251896012921717172737
|
||||
Content-Disposition: form-data; name="o2'file"; filename="o2'file2.txt"
|
||||
Content-Type: text/plain-file2
|
||||
|
||||
2
|
||||
-----------------------------20896060251896012921717172737--
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump($_FILES);
|
||||
var_dump($GLOBALS["o1\'file_name"]);
|
||||
var_dump($GLOBALS["o1\'file_name"] === $_FILES["o1\'file"]["name"]);
|
||||
var_dump($GLOBALS["o1\'file"]);
|
||||
var_dump($GLOBALS["o1\'file"] === $_FILES["o1\'file"]["tmp_name"]);
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(2) {
|
||||
["o1\'file"]=>
|
||||
array(5) {
|
||||
["name"]=>
|
||||
string(12) "o1"
|
||||
["type"]=>
|
||||
string(16) "text/plain-file1"
|
||||
["tmp_name"]=>
|
||||
string(14) "%s"
|
||||
["error"]=>
|
||||
int(0)
|
||||
["size"]=>
|
||||
int(1)
|
||||
}
|
||||
["o2\'file"]=>
|
||||
array(5) {
|
||||
["name"]=>
|
||||
string(13) "o2"
|
||||
["type"]=>
|
||||
string(16) "text/plain-file2"
|
||||
["tmp_name"]=>
|
||||
string(14) "%s"
|
||||
["error"]=>
|
||||
int(0)
|
||||
["size"]=>
|
||||
int(1)
|
||||
}
|
||||
}
|
||||
string(12) "o1"
|
||||
bool(true)
|
||||
string(%d) "%s"
|
||||
bool(true)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user