aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2025-09-21 19:06:06 +0200
committerGravatar GitHub <noreply@github.com> 2025-09-21 19:06:06 +0200
commit92a73a2c4fc7ca1b5f9d633f81e9d235d27bba75 (patch)
tree204388b18c3b7663f92ff475790ecb07aa8bcd73 /lib
parentf0388f64acea1c5c241e4b29d4d19777af500466 (diff)
Minor forgotten str_starts_with (#7991)
A couple of places, which have been forgotten when we moved to using `str_starts_with()` instead of `strpos()`.
Diffstat (limited to 'lib')
-rw-r--r--lib/lib_rss.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php
index 0e916616d..efb427fc4 100644
--- a/lib/lib_rss.php
+++ b/lib/lib_rss.php
@@ -39,7 +39,7 @@ function join_path(...$path_parts): string {
//<Auto-loading>
function classAutoloader(string $class): void {
- if (strpos($class, 'FreshRSS') === 0) {
+ if (str_starts_with($class, 'FreshRSS')) {
$components = explode('_', $class);
switch (count($components)) {
case 1:
@@ -52,7 +52,7 @@ function classAutoloader(string $class): void {
include APP_PATH . '/' . $components[2] . 's/' . $components[1] . $components[2] . '.php';
return;
}
- } elseif (strpos($class, 'Minz') === 0) {
+ } elseif (str_starts_with($class, 'Minz')) {
include LIB_PATH . '/' . str_replace('_', '/', $class) . '.php';
} elseif (str_starts_with($class, 'SimplePie\\')) {
$prefix = 'SimplePie\\';