com web/php: Avoid unset error on some pages, likely do-download pages?: include/layout.inc
| From: | Hannes Magnusson | Date: | Tue, 03 Feb 2015 19:50:27 +0000 |
| Subject: | com web/php: Avoid unset error on some pages, likely do-download pages?: include/layout.inc | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-20645@lists.php.net to get a copy of this message | ||
Commit: 8b26df29fb60a4daefce18d326dcf3963d29e7fc
Author: Hannes Magnusson <bjori@mongodb.com> Tue, 3 Feb 2015 11:50:27 -0800
Parents: e437f8ce410430efc8cc2fcb6d24f6de10e00b76
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=8b26df29fb60a4daefce18d326dcf3963d29e7fc
Log:
Avoid unset error on some pages, likely do-download pages?
This is causing lots of notices in the www error logs :)
Changed paths:
M include/layout.inc
Diff:
diff --git a/include/layout.inc b/include/layout.inc
index 32770a7..11b6c75 100644
--- a/include/layout.inc
+++ b/include/layout.inc
@@ -536,6 +536,11 @@ function get_news_changes()
if (isset($_COOKIE["LAST_NEWS"]) && $_COOKIE["LAST_NEWS"] >=
$date->getTimestamp()) {
return false;
}
+
+ /* It is a bug when this happens.. but I don't know where it is coming from */
+ if (!isset($_SERVER["BASE_PAGE"])) {
+ return false;
+ }
if ($_SERVER["BASE_PAGE"] == "index.php") {
return false;
}