Skip to content

Commit

Permalink
PHP7.2 fix: Added array check before count. (ezsystems#1454) (#180)
Browse files Browse the repository at this point in the history
* Added array check before counting

* Apply suggestions from code review

Check for existence of post variable

Co-Authored-By: André R. <289757+andrerom@users.noreply.github.com>

Co-authored-by: Stian Torjussen <53934716+StianTorjussen@users.noreply.github.com>
Co-authored-by: André R. <289757+andrerom@users.noreply.github.com>
  • Loading branch information
3 people authored Apr 3, 2020
1 parent b5d60f3 commit dfd9943
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ function validateObjectAttributeHTTPInput( $http, $base, $contentObjectAttribute
// If in browse mode and relations have been added using the search field
// items are stored in the post variable
if (
$http->postVariable( $postVariableName ) != array( "no_relation" )
$http->hasPostVariable( $postVariableName )
&& $http->postVariable( $postVariableName ) != array( "no_relation" )
&& count( $http->postVariable( $postVariableName ) ) > 0
)
{
Expand Down

0 comments on commit dfd9943

Please sign in to comment.