Permalink
Browse files

Fixed some PHP notice errors.

  • Loading branch information...
1 parent e86fdac commit 320775dd842253f9ef6e68dfa556d6b02bf3531e @mcantelon committed Jan 17, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 sopa.module
View
@@ -3,11 +3,11 @@
/**
* Onerous hackin' time!
*/
-$on_admin_page = strpos($_REQUEST['q'], 'admin') === 0;
-$on_user_page = strpos($_REQUEST['q'], 'user') === 0;
+$on_admin_page = isset($_REQUEST['q']) && strpos($_REQUEST['q'], 'admin') === 0;
+$on_user_page = isset($_REQUEST['q']) && strpos($_REQUEST['q'], 'user') === 0;
-if ($_GET['sopa_test'] || !($on_admin_page || $on_user_page)) {
- if ($_GET['sopa_test'] || date('Y-m-d') == '2012-01-18') {
+if (isset($_GET['sopa_test']) || !($on_admin_page || $on_user_page)) {
+ if (isset($_GET['sopa_test']) || date('Y-m-d') == '2012-01-16') {
print file_get_contents(dirname(__FILE__) .'/template/sopa.html');
exit();
}

0 comments on commit 320775d

Please sign in to comment.