Skip to content

Commit

Permalink
php 7.2 fix for count (#19135)
Browse files Browse the repository at this point in the history
* php 7.2 fix for count

PR for #19125
PR for #19126

Can you please test this @Quy - I dont have php 7.2 installed yet

If these work then there are lots of other places to be fixed

http://php.net/manual/en/migration72.incompatible.php#migration72.incompatible.warn-on-non-countable-types

* change to !is_array

* chnages as requested
  • Loading branch information
brianteeman authored and Michael Babker committed Jan 8, 2018
1 parent a8cf40f commit 3d15331
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/com_contact/models/categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ protected function getStoreId($id = '')
*/
public function getItems()
{
if (!count($this->_items))
if ($this->_items === null)
{
$app = JFactory::getApplication();
$menu = $app->getMenu();
Expand Down
2 changes: 1 addition & 1 deletion components/com_newsfeeds/models/categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected function getStoreId($id = '')
*/
public function getItems()
{
if (!count($this->_items))
if ($this->_items === null)
{
$app = JFactory::getApplication();
$menu = $app->getMenu();
Expand Down

0 comments on commit 3d15331

Please sign in to comment.