We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f43416e commit 297a2e9Copy full SHA for 297a2e9
src/services/Transcode.php
@@ -467,9 +467,12 @@ public function getFileInfo($filePath, $summary = false)
467
Craft::info($ffprobeCmd, __METHOD__);
468
$result = JsonHelper::decodeIfJson($shellOutput, true);
469
Craft::info(print_r($result, true), __METHOD__);
470
-
+ // Handle the case it not being JSON
471
+ if (!is_array($result)) {
472
+ $result = null;
473
+ }
474
// Trim down the arrays to just a summary
- if ($summary && !empty($result) && is_array($result)) {
475
+ if ($summary && !empty($result)) {
476
$summaryResult = [];
477
foreach ($result as $topLevelKey => $topLevelValue) {
478
switch ($topLevelKey) {
0 commit comments