mirror of
https://github.com/joomla-extensions/patchtester.git
synced 2025-01-13 02:11:31 +00:00
Add check for empty data array
This commit is contained in:
parent
7f838652c7
commit
dac2356335
@ -326,10 +326,8 @@ class PullsModel extends \JModelDatabase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$count = is_array($pulls) ? count($pulls) : 0;
|
|
||||||
|
|
||||||
// If there are no pulls to insert then bail, assume we're finished
|
// If there are no pulls to insert then bail, assume we're finished
|
||||||
if ($count === 0 || empty($pulls))
|
if (count($pulls) === 0)
|
||||||
{
|
{
|
||||||
return array('complete' => true);
|
return array('complete' => true);
|
||||||
}
|
}
|
||||||
@ -366,6 +364,12 @@ class PullsModel extends \JModelDatabase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If there are no pulls to insert then bail, assume we're finished
|
||||||
|
if (count($data) === 0)
|
||||||
|
{
|
||||||
|
return array('complete' => true);
|
||||||
|
}
|
||||||
|
|
||||||
$this->getDb()->setQuery(
|
$this->getDb()->setQuery(
|
||||||
$this->getDb()->getQuery(true)
|
$this->getDb()->getQuery(true)
|
||||||
->insert('#__patchtester_pulls')
|
->insert('#__patchtester_pulls')
|
||||||
|
Loading…
Reference in New Issue
Block a user