SearchPaneOptions.php Editor2.2.2

SearchPaneOptions.php Editor2.2.2

cybersapiencybersapien Posts: 7Questions: 1Answers: 0

Hi! Had to workarround the original code as PHP 5.3 doesnt support array_column to be used with an array of objects.
ln 410 (sugestion)

$entriesKeys = array_map(function ($e) {
return is_object($e) ? $e->value : $e['value'];
}, $entriesRows);

Replies

  • allanallan Posts: 63,679Questions: 1Answers: 10,498 Site admin

    Thanks for flagging that up. I actually think it is past time that we dropped support for PHP 5.3. It is almost a decade since its last release and hasn't received any security patches since then.

    Can I ask why you are using 5.3 (for my own knowledge and planning of support versions)?

    Thanks,
    Allan

  • cybersapiencybersapien Posts: 7Questions: 1Answers: 0

    Unfortunatly i dont manage this application server, it ll be upgraded soon tho.
    But this function has been upgraded to work with an array of objects since PHP 7.0, as:

    https://www.w3schools.com/php/func_array_column.asp

    Perhaps you should keep this workaround for a while.

    Thanks in advance, Allan.

  • allanallan Posts: 63,679Questions: 1Answers: 10,498 Site admin

    Thanks!

    The PHP docs appear to have it as 5.5+ for that method. I totally missed that while implementing it. Yes, I'll get that changed.

    Thanks,
    Allan

Sign In or Register to comment.