mirror of
https://github.com/php/php-src.git
synced 2025-01-20 02:33:37 +08:00
Better skip condition check for session tests.
This commit is contained in:
parent
844e7eb945
commit
df71910d0e
@ -7,16 +7,19 @@ if (!extension_loaded("session") && ini_get("enable_dl")) {
|
||||
if (!extension_loaded("session")) {
|
||||
die("skip Session module not loaded");
|
||||
}
|
||||
if (!file_exists(ini_get("session.save_path"))) {
|
||||
die("skip Session save_path doesn't exist");
|
||||
}
|
||||
$save_path = ini_get("session.save_path");
|
||||
if (!@is_writable($save_path)) {
|
||||
if (($p = strpos($save_path, ';')) !== false) {
|
||||
$save_path = substr($save_path, ++$p);
|
||||
if ($save_path) {
|
||||
if (!file_exists($save_path)) {
|
||||
die("skip Session save_path doesn't exist");
|
||||
}
|
||||
if (!@is_writable($save_path)) {
|
||||
die("skip\n");
|
||||
|
||||
if ($save_path && !@is_writable($save_path)) {
|
||||
if (($p = strpos($save_path, ';')) !== false) {
|
||||
$save_path = substr($save_path, ++$p);
|
||||
}
|
||||
if (!@is_writable($save_path)) {
|
||||
die("skip\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user