Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Alanaktion committed Apr 12, 2023
1 parent 40fbc29 commit c6921b6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions app/controller/taskboard.php
Expand Up @@ -4,6 +4,8 @@

class Taskboard extends \Controller
{
protected $_userId;

public function __construct()
{
$this->_userId = $this->_requireLogin();
Expand Down
3 changes: 2 additions & 1 deletion app/helper/cli.php
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/helper/notification.php
Expand Up @@ -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)
{
Expand Down
3 changes: 1 addition & 2 deletions app/model/session.php
Expand Up @@ -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);

Expand Down

0 comments on commit c6921b6

Please sign in to comment.