Skip to content
This repository was archived by the owner on Dec 16, 2020. It is now read-only.

Commit 1366a4b

Browse files
committed
Fixes #186
1 parent 42926be commit 1366a4b

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/snapchat.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1913,9 +1913,11 @@ function writeToFile($path, $data)
19131913
{
19141914
$newFile = $path . $ext;
19151915
rename($path, $newFile);
1916-
}
19171916

1918-
return $newFile;
1917+
return $newFile
1918+
}
1919+
else
1920+
return false;
19191921
}
19201922

19211923
/**
@@ -2647,7 +2649,8 @@ public function getStory($media_id, $key, $iv, $from, $timestamp, $save = FALSE,
26472649
if(!file_exists($file))
26482650
{
26492651
$newFile = $this->writeToFile($file, $value);
2650-
$files[] = $newFile;
2652+
if($newFile)
2653+
$files[] = $newFile;
26512654
}
26522655
}
26532656
$output = array();

0 commit comments

Comments
 (0)