Skip to content

Commit

Permalink
check Item for null
Browse files Browse the repository at this point in the history
  • Loading branch information
mambax7 committed Dec 27, 2020
1 parent e694eef commit 48032bb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion class/ItemHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ public function create($isNew = true)
*
* @param array|null $fields
* @return mixed reference to the <a href='psi_element://Item'>Item</a> object, FALSE if failed
* object, FALSE if failed
*/
public function get($id = null, $fields = null)
{
Expand Down
2 changes: 1 addition & 1 deletion item.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
$itemObj = $helper->getHandler('Item')->get($itemId);

// if the selected item was not found, exit
if (!$itemObj) {
if (null === $itemObj) {
redirect_header('<script>javascript:history.go(-1)</script>', 1, _MD_PUBLISHER_NOITEMSELECTED);
}

Expand Down

0 comments on commit 48032bb

Please sign in to comment.