Skip to content

Commit 8cbfa30

Browse files
committed
Remove unnecessary else condition
1 parent b218126 commit 8cbfa30

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## 1.2.3 - 23-04-2020
44
- Replace `sizeof()` by `count()` function
5+
- Minor code optimization
56

67
## 1.2.2 - 28-08-2018
78
- Prise en charge du fichier de configuration de l’extension USU

event/listener.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -368,15 +368,11 @@ private function strip_forum_name($uri)
368368
{
369369
return (substr($uri, strpos($uri, $this->forum_info['name'] . $uri_suffix) + strlen($this->forum_info['name'] . $uri_suffix)));
370370
}
371-
else
372-
{
373-
return (substr($uri, strpos($uri, $this->forum_info['name']) + strlen($this->forum_info['name'])));
374-
}
375-
}
376-
else
377-
{
378-
return $uri;
371+
372+
return (substr($uri, strpos($uri, $this->forum_info['name']) + strlen($this->forum_info['name'])));
379373
}
374+
375+
return $uri;
380376
}
381377

382378
/**

0 commit comments

Comments
 (0)