mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
Modernize to PHP 8.1
This commit is contained in:
parent
ca018c77e3
commit
9e2720cddc
26 changed files with 48 additions and 52 deletions
|
@ -100,8 +100,8 @@ class CleanDuplicatesCommand extends Command
|
|||
|
||||
private function similarUrl($url)
|
||||
{
|
||||
if (\in_array(substr($url, -1), ['/', '#'], true)) { // get rid of "/" and "#" and the end of urls
|
||||
return substr($url, 0, \strlen($url));
|
||||
if (\in_array(substr((string) $url, -1), ['/', '#'], true)) { // get rid of "/" and "#" and the end of urls
|
||||
return substr((string) $url, 0, \strlen((string) $url));
|
||||
}
|
||||
|
||||
return $url;
|
||||
|
|
|
@ -144,7 +144,7 @@ class InstallCommand extends Command
|
|||
// return version should be like "PostgreSQL 9.5.4 on x86_64-apple-darwin15.6.0, compiled by Apple LLVM version 8.0.0 (clang-800.0.38), 64-bit"
|
||||
$version = $conn->executeQuery('SELECT version();')->fetchOne();
|
||||
|
||||
preg_match('/PostgreSQL ([0-9\.]+)/i', $version, $matches);
|
||||
preg_match('/PostgreSQL ([0-9\.]+)/i', (string) $version, $matches);
|
||||
|
||||
if (isset($matches[1]) & version_compare($matches[1], '9.2.0', '<')) {
|
||||
$fulfilled = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue