From: Ilia Alshanetsky Date: Thu, 27 May 2004 20:53:26 +0000 (+0000) Subject: Better skip condition check for session tests. X-Git-Tag: php-5.0.0RC3RC2~91 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=df71910d0e0cfca2e7982f0adebae4533a5ba65f;p=php Better skip condition check for session tests. --- diff --git a/ext/session/tests/skipif.inc b/ext/session/tests/skipif.inc index d952e73ca8..6e3eae0862 100644 --- a/ext/session/tests/skipif.inc +++ b/ext/session/tests/skipif.inc @@ -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"); + } } } ?>