Skip to content

Commit

Permalink
PHP Notice: Undefined index: progressiveUpload
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel authored and daniel committed Feb 16, 2021
1 parent fc58fdf commit 687cf2e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions objects/Encoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ static function sendFile($file, $videos_id, $format, $encoder = null, $resolutio
$obj->resolution = $resolution;
$obj->videoDownloadedLink = $encoder->getVideoDownloadedLink();

if ($global['progressiveUpload'] == true && isset($encoder)) {
if (!empty($global['progressiveUpload']) && isset($encoder)) {
$u = Upload::loadFromEncoder($encoder->getId(), $resolution, $forma
);
if ($u !== false && $u->getStatus() == "done") {
Expand Down Expand Up @@ -1006,7 +1006,7 @@ static function sendFile($file, $videos_id, $format, $encoder = null, $resolutio
$user = $s->getUser();
$pass = $s->getPass();

$keep_encoding = ($global['progressiveUpload'] == true);
$keep_encoding = !empty($global['progressiveUpload']);

$target = trim($aVideoURL . "aVideoEncoder.json");
$obj->target = $target;
Expand Down
2 changes: 1 addition & 1 deletion objects/Format.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ private function runMultiResolution($pathFileName, $encoder_queue_id, $order) {
}
}

if ($global['progressiveUpload'] == true)
if (!empty($global['progressiveUpload']))
Upload::create($encoder_queue_id, $destinationFile);

return $obj;
Expand Down
2 changes: 1 addition & 1 deletion view/upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
}
$e->setReturn_vars(json_encode($obj));

if ($global['progressiveUpload'] == true) {
if (!empty($global['progressiveUpload'])) {
Encoder::sendFile($destinationFile, $obj->videos_id, $format, $e, 'HD');
}

Expand Down

0 comments on commit 687cf2e

Please sign in to comment.