diff --git a/app/controller/taskboard.php b/app/controller/taskboard.php index 0ed4fa55..19dc08f7 100644 --- a/app/controller/taskboard.php +++ b/app/controller/taskboard.php @@ -4,6 +4,8 @@ class Taskboard extends \Controller { + protected $_userId; + public function __construct() { $this->_userId = $this->_requireLogin(); diff --git a/app/helper/cli.php b/app/helper/cli.php index be30d2aa..8d7ff93a 100644 --- a/app/helper/cli.php +++ b/app/helper/cli.php @@ -23,7 +23,8 @@ public function parseOptions(array $options, ?array $argv = null): ?array // Show argument help if (getopt('h', ['help']) || (is_countable($argv) ? count($argv) : 0) == 1) { - return $this->showHelp($keys, $options); + $this->showHelp($keys, $options); + return null; } // Parse options diff --git a/app/helper/notification.php b/app/helper/notification.php index 12e5d309..17e403e5 100644 --- a/app/helper/notification.php +++ b/app/helper/notification.php @@ -14,7 +14,7 @@ class Notification extends \Prefab * @link http://php.net/manual/en/function.quoted-printable-encode.php#115840 * * @param string $str - * @return void + * @return string */ public function quotePrintEncode($str) { diff --git a/app/model/session.php b/app/model/session.php index ee6c89ff..ddcf2225 100644 --- a/app/model/session.php +++ b/app/model/session.php @@ -45,8 +45,7 @@ public function loadCurrent(): Session { $f3 = \Base::instance(); $token = $f3->get("COOKIE." . self::COOKIE_NAME); - if ($token) { - $this->load(["token = ?", $token]); + if ($token && $this->load(["token = ?", $token])) { $lifetime = $f3->get("session_lifetime"); $duration = time() - strtotime($this->created);