Skip to content
This repository has been archived by the owner on Nov 19, 2023. It is now read-only.

Commit

Permalink
First check if the array key in $_GET exists before trying to access it.
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlie committed Oct 18, 2016
1 parent 3edcc91 commit c7d5b81
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 c7d5b81

Please sign in to comment.