PHP  
 PHP_HEAD
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Expected Test Failure Report for ext/session/tests/bug73529.phpt ('Bug #73529 session_decode() silently fails on wrong input')

Script

1: <?php
2:
3: ini_set
("session.serialize_handler""php_serialize");
4:
session_start();
5:
6:
$result1 session_decode(serialize(["foo" => "bar"]));
7:
$session1 $_SESSION;
8:
session_destroy();
9:
10:
ini_set("session.serialize_handler""php");
11:
session_start();
12:
13:
$result2 session_decode(serialize(["foo" => "bar"]));
14:
$session2 $_SESSION;
15:
session_destroy();
16:
17:
var_dump($result1);
18:
var_dump($session1);
19:
var_dump($result2);
20:
var_dump($session2);
21:
22:
?>
23:

Expected

bool(true)
array(1) {
  ["foo"]=>
  string(3) "bar"
}
bool(false)
array(0) {
}

Output

bool(true)
array(1) {
  ["foo"]=>
  string(3) "bar"
}
bool(true)
array(0) {
}

Diff

006+ bool(true)
006- bool(false)

 

Generated at Tue, 12 Dec 2017 23:59:00 +0000 (2 days ago)

Copyright © 2005-2017 The PHP Group
All rights reserved.