summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorrojaro <>2010-05-07 08:27:16 +0000
committerrojaro <>2010-05-07 08:27:16 +0000
commita986b10ff0502e18453090a37ff5913002e86572 (patch)
tree7ebacfd0a02aff047c7ce062d0e4d8619979312d /framework
parent5e0ff02ae461ad1cf148cdca7a3ec9a61ce6afa6 (diff)
fixed #239: set_magic_quotes_runtime is deprecate since php 5.3.0 and will be removed in 6.0
Diffstat (limited to 'framework')
-rw-r--r--framework/I18N/core/TCache_Lite.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/framework/I18N/core/TCache_Lite.php b/framework/I18N/core/TCache_Lite.php
index 5eb9825d..6ef78852 100644
--- a/framework/I18N/core/TCache_Lite.php
+++ b/framework/I18N/core/TCache_Lite.php
@@ -534,14 +534,18 @@ class TCache_Lite
// because the filesize can be cached by PHP itself...
clearstatcache();
$length = @filesize($this->_file);
- $mqr = get_magic_quotes_runtime();
- set_magic_quotes_runtime(0);
+ if(version_compare(PHP_VERSION, '5.3.0', 'lt'))
+ {
+ $mqr = get_magic_quotes_runtime();
+ set_magic_quotes_runtime(0);
+ }
if ($this->_readControl) {
$hashControl = @fread($fp, 32);
$length = $length - 32;
}
$data = @fread($fp, $length);
- set_magic_quotes_runtime($mqr);
+ if(isset($mqr))
+ set_magic_quotes_runtime($mqr);
if ($this->_fileLocking) @flock($fp, LOCK_UN);
@fclose($fp);
if ($this->_readControl) {
@@ -622,4 +626,4 @@ class TCache_Lite
}
-?> \ No newline at end of file
+?>