Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod Bug Reports
- » Bug? Or am I too stupid? Modules does...
Bug? Or am I too stupid? Modules does not work on the 8th and 9th
Bug? Or am I too stupid? Modules does not work on the 8th and 9th
The module works fine. I set it to MM_DAY_OF_MONTH - and really every day of month it shows another module -
Only on the 8th and on the 9th of any month its refusing cooperation - nothing shows up.
I really dont know how to solve this problem...
Re: Bug? Or am I too stupid? Modules does not work on the 8th and 9th
I think I can have a guess at this...
When you compare the MM_DAY_OF_MONTH to a number, you must NOT use the leading 0. PHP interprets any numbers with a leading 0 as octal (base 8) numbers.
That's fine for 00 to 07 which are the same number in decimal. But 08 and 09 don't exist in octal, so PHP treats them as being 0. From 10 and up you are fine again as there's no leading 0 and PHP treats them as normal base 10.
So you're not stupid - I remember when I first noticed this behaviour too as it was a surprise to me.
Just use something like:
if (MM_DAY_OF_MONTH == 8) .....
... instead of 08.
Cheers,
Stephen
- Index
- » MetaMod
- » MetaMod Bug Reports
- » Bug? Or am I too stupid? Modules does...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5946
- Total Posts Today:
- 2
- User Info:
- Total Users:
- 7675
- Newest User:
- ferelya229
- Members Online:
- 0
- Guests Online:
- 206
- Online:
- There are no members online
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked