Skip to content

Commit

Permalink
fix php notice for explode
Browse files Browse the repository at this point in the history
  • Loading branch information
ajnyga committed Mar 14, 2019
1 parent d14665c commit 79cf0c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion AllowedUploadsPlugin.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ function checkUpload($hookName, $params) {

$userVars = $request->getUserVars();
$fileName = $userVars['name'];
$extension = strtolower(array_pop(explode('.',$fileName)));
$tmp = explode('.',$fileName);
$extension = strtolower(end($tmp));

$allowedExtensions = $this->getSetting($context->getId(), 'allowedExtensions');

Expand Down
2 changes: 1 addition & 1 deletion version.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<version>
<application>allowedUploads</application>
<type>plugins.generic</type>
<release>1.0.0.3</release>
<release>1.0.0.4</release>
<date>2019-03-05</date>
<lazy-load>1</lazy-load>
<class>AllowedUploadsPlugin</class>
Expand Down

0 comments on commit 79cf0c4

Please sign in to comment.