From d0b20534b94d0295472ab22157a2bc4c2c9fb703 Mon Sep 17 00:00:00 2001 From: Hamid Dehnavi Date: Fri, 7 Jul 2023 04:54:20 +0330 Subject: Refactor "substr" calls to improve code readability Signed-off-by: Hamid Dehnavi --- lib/private/TemplateLayout.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/private/TemplateLayout.php') diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index 658a85152bf..cefa1f30876 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -279,7 +279,7 @@ class TemplateLayout extends \OC_Template { $web = $info[1]; $file = $info[2]; - if (substr($file, -strlen('print.css')) === 'print.css') { + if (str_ends_with($file, 'print.css')) { $this->append('printcssfiles', $web.'/'.$file . $this->getVersionHashSuffix()); } else { $suffix = $this->getVersionHashSuffix($web, $file); -- cgit v1.2.3