Skip to content

Commit

Permalink
Updated sizeof usage to be fully compatible with php7.2 (#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCelavi authored and bobvandevijver committed May 1, 2019
1 parent baab7b7 commit a09b8f9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Builder/Admin/BaseBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,10 @@ protected function getDisplayColumns()
$display = $this->getVariable('display');

// tabs
if (null == $display || 0 == sizeof($display)) {
if (null == $display || (is_array($display) && 0 == count($display))) {
$tabs = $this->getVariable('tabs');

if (null != $tabs || 0 < sizeof($tabs)) {
if (null != $tabs || (is_array($tabs) && 0 < count($tabs))) {
$display = array();

foreach ($tabs as $tab) {
Expand All @@ -261,7 +261,7 @@ protected function getDisplayColumns()
}
}

if (null == $display || 0 == sizeof($display)) {
if (null == $display || (is_array($display) && 0 == count($display))) {
return $this->getAllFields();
}

Expand Down Expand Up @@ -303,10 +303,10 @@ public function getFieldsets()
$display = $this->getVariable('display');

// tabs
if (null == $display || 0 == sizeof($display)) {
if (null == $display || (is_array($display) && 0 == count($display))) {
$tabs = $this->getVariable('tabs');

if (null != $tabs || 0 < sizeof($tabs)) {
if (null != $tabs || (is_array($tabs) && 0 < count($tabs))) {
$display = array();

foreach ($tabs as $tab) {
Expand All @@ -315,7 +315,7 @@ public function getFieldsets()
}
}

if (null == $display || 0 == sizeof($display)) {
if (null == $display || (is_array($display) && 0 == count($display))) {
$display = $this->getAllFields();
}

Expand Down

0 comments on commit a09b8f9

Please sign in to comment.