Skip to content
Permalink
Browse files

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 Mike Fellows
Mike Fellows authored and Mike Fellows committed Jul 7, 2017
1 parent 4bc6a54 commit 9b7488257cdac52e301e40fe83abd4782677d910
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/View/Form/EntityContext.php
@@ -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];
}

0 comments on commit 9b74882

Please sign in to comment.
You can’t perform that action at this time.