com web/php: Avoid unset error on some pages, likely do-download pages?: include/layout.inc
| From: | Paul Dragoonis | 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-21752@lists.php.net to get a copy of this message | ||
Commit: 1bd0ba1d8ce5d9eb6930cdbe963ba87054eeb14d
Author: Hannes Magnusson <bjori@mongodb.com> Tue, 3 Feb 2015 11:50:27 -0800
Parents: 48994a062f92aef06a19cf2571087b47ceeca1ed
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=1bd0ba1d8ce5d9eb6930cdbe963ba87054eeb14d
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;
}