From 9ff51aafc518460e6c45996f09e9fe74e5f8d2e8 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Thu, 25 Jan 2018 22:26:47 +0100 Subject: Use index based string access for substr with length of 1 Signed-off-by: Morris Jobke --- lib/private/Installer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/private/Installer.php') diff --git a/lib/private/Installer.php b/lib/private/Installer.php index ed654c2b241..ea8ee5f01e5 100644 --- a/lib/private/Installer.php +++ b/lib/private/Installer.php @@ -519,7 +519,7 @@ class Installer { foreach(\OC::$APPSROOTS as $app_dir) { if($dir = opendir( $app_dir['path'] )) { while( false !== ( $filename = readdir( $dir ))) { - if( substr( $filename, 0, 1 ) != '.' and is_dir($app_dir['path']."/$filename") ) { + if( $filename[0] !== '.' and is_dir($app_dir['path']."/$filename") ) { if( file_exists( $app_dir['path']."/$filename/appinfo/info.xml" )) { if(!Installer::isInstalled($filename)) { $info=OC_App::getAppInfo($filename); -- cgit v1.2.3