Skip to content

Commit

Permalink
Fix #94 - Fix for illegal string offset error if getCode() is invoked…
Browse files Browse the repository at this point in the history
… with no previous session or database value
  • Loading branch information
dapphp committed May 30, 2020
1 parent 3bd1017 commit c8d3c7d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions securimage.php
Original file line number Diff line number Diff line change
Expand Up @@ -1738,8 +1738,6 @@ public function rangeDownload($audio)
public function getCode($array = false, $returnExisting = false)
{
$code = array();
$time = 0;
$disp = 'error';

if ($returnExisting && strlen($this->code) > 0) {
if ($array) {
Expand Down Expand Up @@ -1778,9 +1776,11 @@ public function getCode($array = false, $returnExisting = false)

if ($array == true) {
return $code;
} else {
} elseif (!empty($code['code'])) {
return $code['code'];
}

return '';
}

/**
Expand Down

0 comments on commit c8d3c7d

Please sign in to comment.