mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
fix issue with null coalescing priority
This commit is contained in:
parent
5453f36c01
commit
d721feb1e4
3 changed files with 3 additions and 3 deletions
|
|
@ -14,7 +14,7 @@ $db = DBConnection::instance();
|
|||
$listData = $db->sqa("SELECT * FROM {$db->prefix}lists WHERE id=$listId");
|
||||
if ( $listData && !is_logged() && !$listData['published'] ) {
|
||||
$extra = json_decode($listData['extra'] ?? '', true, 10, JSON_INVALID_UTF8_SUBSTITUTE);
|
||||
$feedKey = (string)$extra['feedKey'] ?? '';
|
||||
$feedKey = (string) ($extra['feedKey'] ?? '');
|
||||
$inFeedKey = trim(_get('key'));
|
||||
if ($feedKey == '' || $feedKey != $inFeedKey) {
|
||||
die("Access denied.");
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ $db = DBConnection::instance();
|
|||
$listData = $db->sqa("SELECT * FROM {$db->prefix}lists WHERE id=$listId");
|
||||
if ( $listData && need_auth() && !$listData['published'] ) {
|
||||
$extra = json_decode($listData['extra'] ?? '', true, 10, JSON_INVALID_UTF8_SUBSTITUTE);
|
||||
$feedKey = (string)$extra['feedKey'] ?? '';
|
||||
$feedKey = (string) ($extra['feedKey'] ?? '');
|
||||
$inFeedKey = trim(_get('key'));
|
||||
if ($feedKey == '' || $feedKey != $inFeedKey) {
|
||||
die("Access denied!<br> List is not published.");
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ class ListsController extends ApiController {
|
|||
error_log("Failed to decodes JSON data of list extra listId=". (int)$row['id'] . ": " . json_last_error_msg());
|
||||
$extra = [];
|
||||
}
|
||||
$feedKey = (string)$extra['feedKey'] ?? '';
|
||||
$feedKey = (string) ($extra['feedKey'] ?? '');
|
||||
}
|
||||
|
||||
return array(
|
||||
|
|
|
|||
Loading…
Reference in a new issue