Skip to content

Commit a09b8f9

Browse files
TheCelavibobvandevijver
authored andcommitted
Updated sizeof usage to be fully compatible with php7.2 (#323)
1 parent baab7b7 commit a09b8f9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Builder/Admin/BaseBuilder.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,10 @@ protected function getDisplayColumns()
249249
$display = $this->getVariable('display');
250250

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

255-
if (null != $tabs || 0 < sizeof($tabs)) {
255+
if (null != $tabs || (is_array($tabs) && 0 < count($tabs))) {
256256
$display = array();
257257

258258
foreach ($tabs as $tab) {
@@ -261,7 +261,7 @@ protected function getDisplayColumns()
261261
}
262262
}
263263

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

@@ -303,10 +303,10 @@ public function getFieldsets()
303303
$display = $this->getVariable('display');
304304

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

309-
if (null != $tabs || 0 < sizeof($tabs)) {
309+
if (null != $tabs || (is_array($tabs) && 0 < count($tabs))) {
310310
$display = array();
311311

312312
foreach ($tabs as $tab) {
@@ -315,7 +315,7 @@ public function getFieldsets()
315315
}
316316
}
317317

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

0 commit comments

Comments
 (0)