Clock block re-updated
Select messages from # through # Forum FAQ
[/[Print]\]

HeadShot Extreme -> Nuke Blocks / Modules Support

#1: No icon Clock block re-updated Author: [HSX]coRpSELocation: Back of your mind!!! PostPosted: Wed Feb 01, 2023 4:50 pm
    —
Okay, just a heads-up to those of you using my clock block, a small update has been made to the block. I was told that php8 and debug is throwing errors. I have not tested it, but to fix it is simple. For both the 12 hour and 24 hour were slightly different by one had 2 small fixes where one of them required only 1 fix. All you need to do is download the blocks again, and just upload the following from the file:

public_html/blocks/block-Digital_Clock.php

That is the only file.

I'm not sure why it is doing what it should be, because technically what is done is not wrong and is actually valid, so it might be something new that changed with PHP 8.

Download Link:
Please login to see this link
Get registered or Log in

#2: No icon Re: Clock block re-updated Author: Lonestar PostPosted: Thu Feb 02, 2023 5:29 am
    —
Expand

Re-add the "." to the start of the variable call, and then open your "config.php" and turn debug to "false", you will see the error it is throwing, like shown above.

I am not sure why the debug value is reversed, will have to look at that.

#3: No icon Re: Clock block re-updated Author: [HSX]coRpSELocation: Back of your mind!!! PostPosted: Thu Feb 02, 2023 10:34 am
    —
I see that, but like I said, uninitialized variables are technically not wrong and are actually valid. I feel this debate is like the whole inline style debate. Some people saying inline styles wrong and nobody should ever use it, and then others saying that it's fine in case specific needs.

Straight from PHP.net:
Uninitialized variables have a default value of their type depending on the context in which they are used - booleans default to false, integers and floats default to zero, strings (e.g. used in echo) are set as an empty string and arrays become to an empty array.


But they do say as of PHP8 there is an E_WARNING level error. Overall, the error is thrown not to say that it's wrong, but more of a warning saying that there is a variable that is undefined, and if you include another file with that same variable, that it may lead to unpredictable results.



HeadShot Extreme -> Nuke Blocks / Modules Support


output generated using printer-friendly topic mod. All times are GMT - 7 Hours

Page 1 of 1