From e6efa755c9a8c6a6a4cc0faaffc23aea049d8298 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Thu, 25 Jan 2018 22:23:48 +0100 Subject: Use short for of substr to not need strlen() Signed-off-by: Morris Jobke --- lib/private/legacy/template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/private/legacy/template.php') diff --git a/lib/private/legacy/template.php b/lib/private/legacy/template.php index e3365ca455f..c5279bff6b8 100644 --- a/lib/private/legacy/template.php +++ b/lib/private/legacy/template.php @@ -132,7 +132,7 @@ class OC_Template extends \OC\Template\Base { foreach(array_reverse($coreDependencies['vendor']) as $vendorLibrary) { //remove trailing ".js" as addVendorScript will append it OC_Util::addVendorScript( - substr($vendorLibrary, 0, strlen($vendorLibrary) - 3),null,true); + substr($vendorLibrary, 0, -3),null,true); } } else { throw new \Exception('Cannot read core/js/core.json'); -- cgit v1.2.3