Skip to content

Commit

Permalink
Merge pull request #3 from thesecretlab-nl/hotfix/editor-window-get-size
Browse files Browse the repository at this point in the history
The Secret Lab — Check if $_GET['size'] exists before accessing
  • Loading branch information
mcaskill authored Dec 6, 2016
2 parents 662a276 + c7d5b81 commit 03491d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ManualImageCropEditorWindow.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function renderWindow() {

$imageSizes = get_intermediate_image_sizes();

$editedSize = in_array($_GET['size'], $imageSizes) ? $_GET['size'] : null;
$editedSize = (isset($_GET['size']) && in_array($_GET['size'], $imageSizes)) ? $_GET['size'] : null;

$postId = filter_var($_GET['postId'], FILTER_SANITIZE_NUMBER_INT);

Expand Down

0 comments on commit 03491d4

Please sign in to comment.