Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension throws an error on PHP 7.2 and above #25

Open
tiloschroeder opened this issue Jan 3, 2019 · 1 comment
Open

Extension throws an error on PHP 7.2 and above #25

tiloschroeder opened this issue Jan 3, 2019 · 1 comment

Comments

@tiloschroeder
Copy link

I'm using the maplocation field on event details. When I update to PHP 7.2 or 7.3 I get the following error:

<event-details>
    <error><![CDATA[count(): Parameter must be an array or an object that 
implements Countable on 236 of file /home/webgquzk2/html/
extensions/maplocationfield/fields/field.maplocation.php]]></error>
</event-details>

Everything is fine with PHP 7.1 or below.

@FredrikGeers
Copy link

Fixed by changing this line to:
if (is_object($this->_filter_origin['latitude']) && count($this->_filter_origin['latitude']) > 0) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants