mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-12-26 23:26:47 +01:00
php7.4 compatibility: str_starts_with -> strncmp
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user