fix: [feed] array from NULL is not NULL

pull/5253/head
Pierre-Jean Grenier 2019-10-02 16:37:52 +02:00
parent 44f1b89848
commit 027aa91dd4
1 changed files with 1 additions and 1 deletions

View File

@ -1232,7 +1232,7 @@ class Feed extends AppModel
public function importFeeds($feeds, $user, $default = false)
{
$feeds = json_decode($feeds, true);
if (!isset($feeds[0])) {
if ($feeds && !isset($feeds[0])) {
$feeds = array($feeds);
}
$results = array('successes' => 0, 'fails' => 0);