Commit a8af7c94 authored by Vipul Basapati's avatar Vipul Basapati

Solved count error in EloquentHistoryRepository

parent b0495043
......@@ -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