Unverified Commit 563f7b35 authored by Viral Solani's avatar Viral Solani Committed by GitHub

Merge pull request #101 from bvipul/master

Solved count error in EloquentHistoryRepository
parents b0495043 a8af7c94
......@@ -224,9 +224,15 @@ class EloquentHistoryRepository implements HistoryContract
{
$assets = json_decode($assets, true);
$count = 1;
$asset_count = count($assets) + 1;
$asset_count = 1;
$flag = false;
if (count($assets)) {
if(is_array($assets) || $assets instanceof \Countable) {
$asset_count = count($assets) + 1;
$flag = true;
}
if ($flag) {
foreach ($assets as $name => $values) {
$key = explode('_', $name)[0];
$type = explode('_', $name)[1];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment