PHP7 Compatibilty for EE 2.11 (Low Search 4.4.3)
Hey Low... Any chance that Low Search for EE 2.11 will be PHP7 compatible?
A PHP Error was encountered
Severity: Warning
Message: Declaration of Low_search_word_model::delete($word, $lang) should be compatible with Low_search_model::delete($id, $attr = false)
Filename: models/low_search_word_model.php
Line Number: 0
Replies
dpdexter 24 Mar 2016 03:35
Actually, this was a pretty straight forward fix. I simply updated the method signatures to match the parent class method. It could be simplified by using the parameters directly in the where clauses, but sense they had meaning I did a little name variable reassignment.
low_search_word_model.php:362
public function delete($id, $attr = FALSE)
{
$word = $id;
$lang = $attr;
ee()->db->where('site_id', $this->site_id)
->where('language', $lang)
->where('word', $word)
->delete($this->table());
}
Low 24 Mar 2016 15:34
I'll look at making it official. :)
Stephen 2 Sep 2016 13:45
I've just noticed this issue in Low Search 4.4.4 and EE 2.11.2.
Is the above fix still the recommended way to work around this issue in the EE2 compatible version?
Low 2 Sep 2016 18:05
Yeah, should work.
Stephen 3 Sep 2016 22:55
Thanks Low.
Martin Pedemonte 17 Jun 2017 06:38
Hi Low,
Did some server/ee updates and here is my config now:
- Low Search 4.4.2
- PHP7
- Expression Engine v2.11.9
Same for Low Variables
- Low Variables 2.6.1
It's ok? Will both modules work with PHP7?
Can't move to EE3 because a few modules are not compatible.
Thanks in advance,
Martín
Low 17 Jun 2017 12:32
The EE3-compatible versions of Low Search and Low Variables are also compatible with PHP7, so moving forward shouldn't be an issue for Low add-ons.