mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 03:40:37 +02:00
Backward compatibility with PHP 5.6
This commit is contained in:
@@ -447,8 +447,16 @@ class e_array {
|
|||||||
$first2Chars = substr($ArrayData,0,2);
|
$first2Chars = substr($ArrayData,0,2);
|
||||||
if($first2Chars === 'a:' || $first2Chars === 's:') // php serialize.
|
if($first2Chars === 'a:' || $first2Chars === 's:') // php serialize.
|
||||||
{
|
{
|
||||||
$dat = unserialize($ArrayData, ['allowed_classes' => false]);
|
if(PHP_MAJOR_VERSION > 5)
|
||||||
$ArrayData = $this->WriteArray($dat,FALSE);
|
{
|
||||||
|
$dat = unserialize($ArrayData, ['allowed_classes' => false]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$dat = unserialize($ArrayData);
|
||||||
|
}
|
||||||
|
|
||||||
|
$ArrayData = $this->serialize($dat,FALSE);
|
||||||
}
|
}
|
||||||
elseif(strpos($ArrayData,'{') === 0 || strpos($ArrayData,'[') === 0) // json
|
elseif(strpos($ArrayData,'{') === 0 || strpos($ArrayData,'[') === 0) // json
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user