1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 22:57:14 +02:00

Closes #3305 Added a backward compatibility fix for buggy array storage data.

This commit is contained in:
Cameron
2018-07-22 10:39:01 -07:00
parent 9697e114b1
commit 262dc7f36b
2 changed files with 11 additions and 6 deletions

View File

@@ -420,7 +420,7 @@ class e_array {
* Returns an array from stored array data in php serialized, e107 var_export and json-encoded data.
*
* @param string $ArrayData
* @return array stored data
* @return array|bool stored data
*/
public function unserialize($ArrayData)
{
@@ -461,12 +461,17 @@ class e_array {
$ArrayData = trim($ArrayData);
if(strpos($ArrayData, "\$data = ") === 0) // Fix for buggy old value.
{
$ArrayData = substr($ArrayData,8);
}
if(strtolower(substr($ArrayData,0,5)) != 'array')
{
return false;
}
if(strpos($ArrayData,"0 => \'")!=false)
if(strpos($ArrayData," => \'") !== false)
{
$ArrayData = stripslashes($ArrayData);
}