Check if realpath() returns false

realpath() returns false in case the directory does not exist. Found it while preparing strict_typing for PHP7+.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2018-01-12 15:45:51 +01:00 committed by Roeland Jago Douma
父節點 e4e39910f3
當前提交 1efde41333
沒有發現已知的金鑰在資料庫的簽署中
GPG Key ID: F941078878347C0C

查看文件

@ -186,7 +186,7 @@ class MigrationService {
protected function findMigrations() {
$directory = realpath($this->migrationsPath);
if (!file_exists($directory) || !is_dir($directory)) {
if ($directory === false || !file_exists($directory) || !is_dir($directory)) {
return [];
}