php7.4 compatibility: str_starts_with -> strncmp

This commit is contained in:
billz
2025-10-11 00:45:21 -07:00
parent e3e9adb63e
commit a844328da3

View File

@@ -369,7 +369,7 @@ class PluginInstaller
$source = escapeshellarg($pluginDir . DIRECTORY_SEPARATOR . $config['source']);
$destination = $config['destination'];
if (!str_starts_with($destination, '/')) {
if (strncmp($destination, '/', 1) !== 0) {
$destination = $this->rootPath . '/' . ltrim($destination, '/');
}
$destination = escapeshellarg($destination);