Skip to forum content

LuxCal Web Calendar

The place for news, questions and suggestions

You are not logged in. Please login or register.


Post new reply

LuxCal Web Calendar → Problems → Error with PHP 8.5 → Post new reply

Post new reply

Compose and post your new reply

You may use: BBCode Images Smilies

All fields with bold label must be completed before the form is submitted.

Required information for guests


Required information

Topic review (newest first)

2

Hi Riaan,
Thank you very much for reporting this problem. I had not found the problem because my ISP hasn't installed PHP 8.5 yet.
I already have some more experience with Claude and I find it really good! But I always check and test the suggested fixes smile
Furthermore I scanned all LuxCal code and found more places where the same problem could occur. I've repaired all and the changes will be part of the next LuxCal version 5.3.6.

If you want and if you are using LuxCal 5.3.5, I can send you the (eight) changed files.

Regards,
Roel

1

Hi Roel
An error message appeared with version 5.3.5 on PHP 8.5, at the top of the calendar: Warning: Cannot use bool as array in ..luxcal/common/retrieve.php on line 82   The fix (thanks to Claude) is:

Line 82 in retrieve.php:

php
while (list($ID,$sda,$eda,$checked,$rUntil) = $stH->fetch(PDO::FETCH_NUM)) {

The cause is the loop's exit condition, not a broken query. When the rows run out, fetch() returns false, and list() tries to destructure that false as an array. PHP 7 did it silently; PHP 8.5 warns. The loop then exits correctly — so it's harmless, but it fires once every time the function runs, and retrieve() is called several times per page. That's exactly the repetition you're seeing.

Replace line 82 with:

php
    while (($rollRow = $stH->fetch(PDO::FETCH_NUM)) !== false) {
        list($ID,$sda,$eda,$checked,$rUntil) = $rollRow;

Behaviour is identical — fetch, check it's a real row, then destructure. Note this adds a line, so the original while (...) { becomes two lines; everything inside the loop stays as it is.

Three follow-ups:

The same pattern is almost certainly behind the others. Your earlier log showed header.php lines 287/299/312 and eventform1.php line 30. Check whether those are also list(...) = ...fetch(...) in a while — same fix applies.


Report it to LuxSoft. This will affect every LuxCal install on PHP 8.5, and it's a two-line fix per occurrence — they'd likely want it in 5.3.6.

It seemed to work well.
Regards
Riaan




Claude is AI and can make mistakes. Please double-che

LuxCal Web Calendar → Problems → Error with PHP 8.5 → Post new reply