1
0
Mirror von https://github.com/nextcloud/server.git synchronisiert 2024-09-01 17:54:51 +02:00

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>
Dieser Commit ist enthalten in:
Morris Jobke 2018-01-12 15:45:51 +01:00 committet von Roeland Jago Douma
Ursprung e4e39910f3
Commit 1efde41333
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: F941078878347C0C

Datei anzeigen

@ -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 [];
}