mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 05:43:55 -07:00
JSON decode нужен массивами, а не объектами
Хотя проблема, честно, странная. Согласно инструкции должно по-умолчанию отдавать массивами, а у нас поведение отличное.
This commit is contained in:
parent
12dfc04697
commit
f8d0238f5b
2 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@ if (!defined('IN_AJAX')) die(basename(__FILE__));
|
|||
global $bf, $lang;
|
||||
|
||||
$user_id = (int) $this->request['user_id'];
|
||||
$new_opt = Zend\Json\Json::decode($this->request['user_opt']);
|
||||
$new_opt = Zend\Json\Json::decode($this->request['user_opt'], Zend\Json\Json::TYPE_ARRAY);
|
||||
|
||||
if (!$user_id OR !$u_data = get_userdata($user_id))
|
||||
{
|
||||
|
|
|
@ -671,7 +671,7 @@ class user_common
|
|||
}
|
||||
else if (!empty($_COOKIE['opt_js']))
|
||||
{
|
||||
$opt_js = Zend\Json\Json::decode($_COOKIE['opt_js']);
|
||||
$opt_js = Zend\Json\Json::decode($_COOKIE['opt_js'], Zend\Json\Json::TYPE_ARRAY);
|
||||
|
||||
if (is_array($opt_js))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue