From 2aa5dbd529ffde66b96839df644b110eeaab26d9 Mon Sep 17 00:00:00 2001 From: mDeflotte Date: Tue, 28 Feb 2012 09:49:37 +0000 Subject: [PATCH] // Fix bug with getPaginationLink and undefined php_self --- classes/Link.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/classes/Link.php b/classes/Link.php index 2f487b02c..dc4fca3d3 100644 --- a/classes/Link.php +++ b/classes/Link.php @@ -430,7 +430,13 @@ class LinkCore if ($type && $id_object) $url = $this->{'get'.$type.'Link'}($id_object, null); else - $url = $this->getPageLink(Context::getContext()->controller->php_self); + { + if (isset(Context::getContext()->controller->php_self)) + $name = Context::getContext()->controller->php_self; + else + $name = Dispatcher::getInstance()->getController(); + $url = $this->getPageLink($name); + } $vars = (!$array) ? '' : array(); $vars_nb = array('n', 'search_query');