uasort deprecated

Post Reply
arfa
Master Bludit
Posts: 98
Joined: Tue Jul 04, 2017 4:31 am
Location: New Zealand
Has thanked: 6 times
Been thanked: 14 times

I am looking at a pre php8 plugin so have been using a php7 test setup. I switch back to -8 and set debug to TRUE and am now getting:
Deprecated: uasort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero in ...\bl-kernel\pages.class.php on line 419
I have reset debug to FALSE, deleted browser history, restarted the browser, restarted my PC - but still the error persists and breaks admin. I can't even create a new page.

When I rem line 419 - it seems to work OK but... this is only with limited testing.

I can't imagine that this deprecation is new knowledge.
What say you?

thx - kusalo

PS edit - a bit more testing... with the line remmed I can add a new page but it doesn't show on home.php. It is all there (content: pages, database) but is not properly sorted - rem'd or not. If I load the full URL it is displayed. Hmmmm
User avatar
Edi
Site Admin
Posts: 3168
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 66 times
Been thanked: 90 times
Contact:

Which version of Bludit do you use?
arfa wrote: Tue Oct 29, 2024 10:04 pm I am looking at a pre php8 plugin so have been using a php7 test setup.
Which plugin do you mean?
If I load the full URL it is displayed.
What do you mean with "full URL"?
arfa
Master Bludit
Posts: 98
Joined: Tue Jul 04, 2017 4:31 am
Location: New Zealand
Has thanked: 6 times
Been thanked: 14 times

Which plugin do you mean?
https://plugins.bludit.com/plugin/php-shortcodes
and this is in relation to:
viewtopic.php?t=2947&start=10
What do you mean with "full URL"?
sorry - the full URL "with slug" - the full-direct link to the page.

I have given more time to this.
1 - There are mixed messages regarding this (supposed) function deprecation in -8. The bottom line is that the PHP manual
https://www.php.net/manual/en/function.uasort.php
makes no mention of it. A bit confusing and where/why does the error msg appear on my site?

2 - I see now I was working under a basic assumption that bludit reads the metadata.json when a plugin is added to the bl-plugins folder BUT... this seems to be *wrong* and that if there is bad code in the plugin deactivating the plugin is not enough - it needs to be removed/deleted from the bl-plugins folder. I did this and... no error msg.

So, I am not sure if this thread adds anything to the whole or is just a part of my learning curve? I am back on track and moving forward.

thx - kusalo
Post Reply