diff options
| author | Damien Regad <dregad@mantisbt.org> | 2023-03-16 23:35:08 +0100 |
|---|---|---|
| committer | Damien Regad <dregad@mantisbt.org> | 2023-03-17 22:55:29 +0100 |
| commit | 96236f468ad4db84e2928102556410bec36a3b28 (patch) | |
| tree | af16711b9a4d8d3bb78bae8876ce51dd5f2b01ee | |
| parent | c37230ed2fdecd57eefd26300c331629f92bc653 (diff) | |
| download | adodb-96236f468ad4db84e2928102556410bec36a3b28.tar.gz adodb-96236f468ad4db84e2928102556410bec36a3b28.tar.bz2 adodb-96236f468ad4db84e2928102556410bec36a3b28.zip | |
Remove safe mode references
safe_mode was deprecated in PHP 5.3 and removed in 5.4. This removes
remaining references to it in the code.
Fixes #934
| -rw-r--r-- | adodb.inc.php | 9 | ||||
| -rw-r--r-- | tests/test.php | 2 |
2 files changed, 4 insertions, 7 deletions
diff --git a/adodb.inc.php b/adodb.inc.php index 02f4ed53..ac4a6ecb 100644 --- a/adodb.inc.php +++ b/adodb.inc.php @@ -391,10 +391,7 @@ if (!defined('_ADODB_LAYER')) { */ function getdirname($hash) { global $ADODB_CACHE_DIR; - if (!isset($this->notSafeMode)) { - $this->notSafeMode = !ini_get('safe_mode'); - } - return ($this->notSafeMode) ? $ADODB_CACHE_DIR.'/'.substr($hash,0,2) : $ADODB_CACHE_DIR; + return $ADODB_CACHE_DIR . '/' . substr($hash, 0, 2); } /** @@ -409,7 +406,7 @@ if (!defined('_ADODB_LAYER')) { global $ADODB_CACHE_PERMS; $dir = $this->getdirname($hash); - if ($this->notSafeMode && !file_exists($dir)) { + if (!file_exists($dir)) { $oldu = umask(0); if (!@mkdir($dir, empty($ADODB_CACHE_PERMS) ? 0771 : $ADODB_CACHE_PERMS)) { if(!is_dir($dir) && $debug) { @@ -2472,7 +2469,7 @@ if (!defined('_ADODB_LAYER')) { * - userid * - setFetchMode (adodb 4.23) * - * When not in safe mode, we create 256 sub-directories in the cache directory ($ADODB_CACHE_DIR). + * We create 256 sub-directories in the cache directory ($ADODB_CACHE_DIR). * Assuming that we can have 50,000 files per directory with good performance, * then we can scale to 12.8 million unique cached recordsets. Wow! */ diff --git a/tests/test.php b/tests/test.php index fb23980b..08a2e301 100644 --- a/tests/test.php +++ b/tests/test.php @@ -1719,7 +1719,7 @@ if (@$_SERVER['COMPUTERNAME'] == 'TIGRESS') { CheckWS('firebird'); CheckWS('sybase'); - if (!ini_get('safe_mode')) CheckWS('informix'); + CheckWS('informix'); CheckWS('ado_mssql'); CheckWS('ado_access'); |
