Skip to content

Commit

Permalink
Merge branch 'master' of github.com:scottchiefbaker/EasyCapture
Browse files Browse the repository at this point in the history
  • Loading branch information
scottchiefbaker committed Jun 29, 2021
2 parents ee761cd + db6004c commit d5f52fb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ec.class.php
Expand Up @@ -17,6 +17,7 @@ function __construct() {
"jpg" => 1,
"png" => 1,
"jpeg" => 1,
"webp" => 1,
);

session_start();
Expand Down Expand Up @@ -398,7 +399,7 @@ function get_file_info($filename) {

if (is_array($filename)) {
if ($this->debug) { print "Image info for an Array!?! Return 0<br />\n\n"; }
return 0;
return [];
}

if ($this->debug) { print "get_file_info for <b>$filename</b><br />\n"; }
Expand Down Expand Up @@ -629,7 +630,7 @@ function capture_image($url) {
if ($action) { $confirm = 1; }

// If the file already exists, and they haven't confirmed
if ($info['full_html_path'] && !$confirm) {
if (!empty($info['full_html_path']) && !$confirm) {
$this->confirm_overwrite($url);
}

Expand Down Expand Up @@ -667,7 +668,7 @@ function capture_image($url) {
$filesize = $this->human_filesize($filesize);

$img = @imagecreatefromstring($file_contents);
if (!$img) { $this->error("Something went wrong trying to capture <b>$filename</b>"); }
if (!$img) { $this->error("Something went wrong capturing image <b>$filename</b>"); }

$time = time();

Expand Down

0 comments on commit d5f52fb

Please sign in to comment.