diff --git a/administrator/components/com_associations/src/Helper/AssociationsHelper.php b/administrator/components/com_associations/src/Helper/AssociationsHelper.php index 098a7ac90fbec..67c4d0142ebd4 100644 --- a/administrator/components/com_associations/src/Helper/AssociationsHelper.php +++ b/administrator/components/com_associations/src/Helper/AssociationsHelper.php @@ -193,7 +193,7 @@ private static function getExtensionHelperClassName($extensionName) */ private static function getExtensionRealName($extensionName) { - return !str_contains($extensionName, 'com_') ? $extensionName : substr($extensionName, 4); + return !str_starts_with($extensionName, 'com_') ? $extensionName : substr($extensionName, 4); } /** diff --git a/administrator/components/com_cpanel/src/View/Cpanel/HtmlView.php b/administrator/components/com_cpanel/src/View/Cpanel/HtmlView.php index 3e8bc11296dd2..bc861c51637d0 100644 --- a/administrator/components/com_cpanel/src/View/Cpanel/HtmlView.php +++ b/administrator/components/com_cpanel/src/View/Cpanel/HtmlView.php @@ -69,7 +69,7 @@ public function display($tpl = null) $parts = explode('.', $dashboard); $component = $parts[0]; - if (!str_contains($component, 'com_')) { + if (!str_starts_with($component, 'com_')) { $component = 'com_' . $component; } diff --git a/administrator/components/com_postinstall/src/Helper/PostinstallHelper.php b/administrator/components/com_postinstall/src/Helper/PostinstallHelper.php index 59838745fbb0f..b41667da25a2c 100644 --- a/administrator/components/com_postinstall/src/Helper/PostinstallHelper.php +++ b/administrator/components/com_postinstall/src/Helper/PostinstallHelper.php @@ -32,9 +32,9 @@ class PostinstallHelper */ public function parsePath($path) { - if (str_contains($path, 'site://')) { + if (str_starts_with($path, 'site://')) { $path = JPATH_ROOT . str_replace('site://', '/', $path); - } elseif (str_contains($path, 'admin://')) { + } elseif (str_starts_with($path, 'admin://')) { $path = JPATH_ADMINISTRATOR . str_replace('admin://', '/', $path); } diff --git a/modules/mod_wrapper/src/Helper/WrapperHelper.php b/modules/mod_wrapper/src/Helper/WrapperHelper.php index e30aeb56c6ce8..ef57b64d7567b 100644 --- a/modules/mod_wrapper/src/Helper/WrapperHelper.php +++ b/modules/mod_wrapper/src/Helper/WrapperHelper.php @@ -52,7 +52,7 @@ public function getParamsWrapper(Registry $params, SiteApplication $app) if (str_starts_with($url, '/')) { // Relative URL in component. use server http_host. $url = 'http://' . $app->getInput()->server->get('HTTP_HOST') . $url; - } elseif (!str_contains($url, 'http') && !str_contains($url, 'https')) { + } elseif (!str_starts_with($url, 'http://') && !str_starts_with($url, 'https://')) { $url = 'http://' . $url; } } diff --git a/plugins/system/languagefilter/src/Extension/LanguageFilter.php b/plugins/system/languagefilter/src/Extension/LanguageFilter.php index eec4e7fb45706..446e2275a0980 100644 --- a/plugins/system/languagefilter/src/Extension/LanguageFilter.php +++ b/plugins/system/languagefilter/src/Extension/LanguageFilter.php @@ -514,7 +514,7 @@ public function parseRule(&$router, &$uri) $language_new = $this->languageFactory->createLanguage($lang_code, (bool) $app->get('debug_lang')); foreach ($language->getPaths() as $extension => $files) { - if (str_contains($extension, 'plg_system')) { + if (str_starts_with($extension, 'plg_system')) { $extension_name = substr($extension, 11); $language_new->load($extension, JPATH_ADMINISTRATOR)