File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -884,7 +884,7 @@ public function storePermissions($permission = null)
884884 }
885885
886886 // We are creating a new item so we don't have an item id so don't allow.
887- if (substr ($ permission ['component ' ], - 6 ) === '.false ' ) {
887+ if (str_ends_with ($ permission ['component ' ], '.false ' ) ) {
888888 $ app ->enqueueMessage (Text::_ ('JLIB_RULES_SAVE_BEFORE_CHANGE_PERMISSIONS ' ), 'error ' );
889889
890890 return false ;
Original file line number Diff line number Diff line change @@ -1316,7 +1316,7 @@ private function setCorrectPermissions(string $path): void
13161316 */
13171317 private function isIgnoredDirectory (string $ shortFilename ): bool
13181318 {
1319- $ check = substr ($ shortFilename , - 1 ) == '/ ' ? rtrim ($ shortFilename , '/ ' ) : \dirname ($ shortFilename );
1319+ $ check = str_ends_with ($ shortFilename , '/ ' ) ? rtrim ($ shortFilename , '/ ' ) : \dirname ($ shortFilename );
13201320
13211321 return \in_array ($ check , $ this ->ignoreDirectories );
13221322 }
@@ -1375,7 +1375,7 @@ private function processTypeLink(): bool
13751375 }
13761376
13771377 // Remove any trailing slash
1378- if (substr ($ filename , - 1 ) == '/ ' ) {
1378+ if (str_ends_with ($ filename , '/ ' ) ) {
13791379 $ filename = substr ($ filename , 0 , -1 );
13801380 }
13811381
Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ public static function exists(string $folderName): bool
201201 */
202202 public static function delete (string $ folderName ): bool
203203 {
204- if (substr ($ folderName , - 1 ) == '/ ' ) {
204+ if (str_ends_with ($ folderName , '/ ' ) ) {
205205 $ folderName = substr ($ folderName , 0 , -1 );
206206 }
207207
Original file line number Diff line number Diff line change @@ -1101,7 +1101,7 @@ public function getOverridesList()
11011101 $ path = $ folder . '/ ' . $ view . '/tmpl ' ;
11021102
11031103 // The new scheme, the views are directly in the component/tmpl folder
1104- if (!is_dir ($ path ) && substr ($ folder , - 4 ) == 'tmpl ' ) {
1104+ if (!is_dir ($ path ) && str_ends_with ($ folder , 'tmpl ' ) ) {
11051105 $ path = $ folder . '/ ' . $ view ;
11061106 }
11071107
You can’t perform that action at this time.
0 commit comments