-
AuthorPosts
-
July 28th, 2026 at 16:12 #159719
I updated to PHP 8.3, and got a fatal error originating in the Kahuna theme.
The problem: In custom-styles.php on line 208, the Kahuna theme is dividing a number by zero. In PHP 7, this was harmless — it just produced a warning and the page kept loading. In PHP 8+, this is now a fatal error that stops the whole page. Claude helped me ID the problem:
This is calculating a width-to-height ratio for your Landing Page “Featured Boxes” — and it’s dividing width by height. If either of the height values ($kahuna_lpboxheight1 or $kahuna_lpboxheight2) is set to 0, you get a division-by-zero, which is exactly the fatal error you hit. In PHP 7 this just silently produced a broken/infinite value; PHP 8 correctly refuses and crashes instead.
The fix:
Update a Customizer setting (no code editing needed)
In WordPress admin, go to Appearance → Customize.
Look for a section called Landing Page.
Find Featured Boxes settings within that section.
Look for width and height fields for Featured Box sections 1 and 2 (this matches the “2 Featured Boxes Sections” listed in Kahuna’s free feature set).
If either height field is blank or set to 0, enter a real number (e.g., match whatever the width is set to, or use a standard value like 300).
Click Publish/Save.Website: gccw.info
-
AuthorPosts
You need to log in to reply to this topic.