From b0a1936dea0b84b8ea623f63533442bfd5db2762 Mon Sep 17 00:00:00 2001 From: Awilum Date: Wed, 21 Nov 2012 22:54:51 +0200 Subject: [PATCH] Pages Plugin: method robots() fixes. --- plugins/box/pages/pages.plugin.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/plugins/box/pages/pages.plugin.php b/plugins/box/pages/pages.plugin.php index 19cf0b2..a15fd93 100644 --- a/plugins/box/pages/pages.plugin.php +++ b/plugins/box/pages/pages.plugin.php @@ -426,7 +426,16 @@ * */ public static function robots() { - return (Pages::$page !== null) ? Pages::$page['robots_index'].', '.Pages::$page['robots_follow'] : ''; + + if (Pages::$page !== null) { + $_index = (isset(Pages::$page['robots_index'])) ? Pages::$page['robots_index'] : ''; + $_follow = (isset(Pages::$page['robots_follow'])) ? Pages::$page['robots_follow'] : ''; + $robots = ( ! empty($_index) && ! empty($_follow)) ? $_index.', '.$_follow : ''; + } else { + $robots = ''; + } + + return $robots; } } \ No newline at end of file