From 667528d5b927f0f284a067b0e24c9ca7f26c28a4 Mon Sep 17 00:00:00 2001 From: wn_ Date: Sat, 23 Nov 2024 18:23:49 +0000 Subject: Use PHP 8 'str_' functions. A few more characters in some places, but helps with readability. --- plugins/cache_starred_images/init.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/cache_starred_images') diff --git a/plugins/cache_starred_images/init.php b/plugins/cache_starred_images/init.php index 208eafde9..cc1eef0dc 100755 --- a/plugins/cache_starred_images/init.php +++ b/plugins/cache_starred_images/init.php @@ -205,7 +205,7 @@ class Cache_Starred_Images extends Plugin { foreach ($entries as $entry) { - if ($entry->hasAttribute('src') && strpos($entry->getAttribute('src'), "data:") !== 0) { + if ($entry->hasAttribute('src') && !str_starts_with($entry->getAttribute('src'), "data:")) { $has_images = true; -- cgit v1.2.3-54-g00ecf