Skip to content

Commit

Permalink
Fix saving cookies
Browse files Browse the repository at this point in the history
When attempting a save cookies, an error was thrown:
"Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, bool given" 

Added parenthesis to fix order of operations
  • Loading branch information
jheyneman authored May 11, 2021
1 parent 09bf4e9 commit 69acadd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/cookies/cookies.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function set()
if(strlen($value))
{
$tmp = explode("|",$value);
if(count($tmp>1) && (trim($tmp[1])!=''))
if((count($tmp)>1) && (trim($tmp[1])!=''))
{
$cookies = array();
$tmp1 = explode(";",$tmp[1]);
Expand Down

0 comments on commit 69acadd

Please sign in to comment.