Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix conditional using count to not emit warning in PHP 7.2
- In this case it appears that only arrays with a size greater than 1 need
  to be dealt with by the main part of the _getTable function.  Everything
  other kind of object should return $this->_tables[$this->_rootName].
  • Loading branch information
Mike Fellows authored and Mike Fellows committed Jul 7, 2017
1 parent 4bc6a54 commit 9b74882
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/View/Form/EntityContext.php
Expand Up @@ -482,7 +482,7 @@ protected function _getValidator($parts)
*/
protected function _getTable($parts, $rootFallback = true)
{
if (count($parts) === 1) {
if (!is_array($parts) || count($parts) === 1) {
return $this->_tables[$this->_rootName];
}

Expand Down

0 comments on commit 9b74882

Please sign in to comment.