Skip to content

Commit

Permalink
PHP7.2 fix: Added array check before count. (#1454)
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. <[email protected]>
  • Loading branch information
StianTorjussen and andrerom authored Mar 18, 2020
1 parent f1fd047 commit fe61c8a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,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 fe61c8a

Please sign in to comment.