Fix PHP notices in boot, index and App

- Use defaults() with $_GET variables in boot
- Initialize $a before checking for object member in boot
- Initilialize the $_SESSION variable for backend mode in index
- Add member variable page_offset to App
This commit is contained in:
Hypolite Petovan 2018-01-01 15:08:00 -05:00
parent 54d598ce7c
commit 585c00347d
3 changed files with 8 additions and 8 deletions

View file

@ -97,6 +97,7 @@ if (!$a->is_backend()) {
session_start();
$a->save_timestamp($stamp1, "parser");
} else {
$_SESSION = [];
Worker::executeIfIdle();
}
@ -148,7 +149,7 @@ if ((x($_GET, 'zrl')) && (!$install && !$maintenance)) {
// header('Link: <' . System::baseUrl() . '/amcd>; rel="acct-mgmt";');
if (x($_COOKIE["Friendica"]) || (x($_SESSION, 'authenticated')) || (x($_POST, 'auth-params')) || ($a->module === 'login')) {
if (x($_COOKIE, "Friendica") || (x($_SESSION, 'authenticated')) || (x($_POST, 'auth-params')) || ($a->module === 'login')) {
require "include/auth.php";
}