From a15b66dc249e0b64b676a5c841d8884f19d389e8 Mon Sep 17 00:00:00 2001 From: slimtim Date: Thu, 21 Nov 2013 08:18:19 -0500 Subject: [PATCH] Prevent fatal error when filtering tables in the navigation tree. (bug #4159) --- libraries/navigation/NavigationTree.class.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libraries/navigation/NavigationTree.class.php b/libraries/navigation/NavigationTree.class.php index 85d12f287c..2dcfb7ccd8 100644 --- a/libraries/navigation/NavigationTree.class.php +++ b/libraries/navigation/NavigationTree.class.php @@ -692,11 +692,14 @@ class PMA_NavigationTree } if (! empty($this->_searchClause) || ! empty($this->_searchClause2)) { + $results = 0; if (! empty($this->_searchClause2)) { - $results = $node->realParent()->getPresence( - $node->real_name, - $this->_searchClause2 - ); + if (is_object($node->realParent())) { + $results = $node->realParent()->getPresence( + $node->real_name, + $this->_searchClause2 + ); + } } else { $results = $this->_tree->getPresence( 'databases',