Sunday, 21 May 2017
  7 Replies
  10.7K Visits
0
Votes
Undo
Hi

after switching to PHP 7.1 I am getting this error in the frontend event list:

Warning: A non-numeric value encountered in /home/sites/public_html/components/com_jevents/views/default/helpers/defaultloadedfromtemplate.php on line 1083

Warning: A non-numeric value encountered in /home/sites/public_html/components/com_jevents/views/default/helpers/defaultloadedfromtemplate.php on line 1084

As soon as I switch back to PHP 7.0, the error has gone.


PHP Version : 7.1.4
MySQL Version : 5.5.5-10.1.14-MariaDB
Server Information : Linux web6.n4.stackcp.net 2.6.32-696.1.1.el6.x86_64 #1 SMP Tue Apr 11 17:13:24 UTC 2017 x86_64
Fix jQuery? : Yes
Load JEvents Bootstrap CSS? : Yes
Max Input Vars ? : 2500
Club code set? : No
User Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0
Joomla : 3.7.1
component_com_jevents : 3.4.39
component_com_jce : 2.6.12
module_mod_jevents_cal : 3.4.39
module_mod_jevents_custom : 3.4.39
module_mod_jevents_filter : 3.4.39
module_mod_jevents_latest : 3.4.39
module_mod_jevents_legend : 3.4.39
module_mod_jevents_switchview : 3.4.39
plugin_content_jevents : 3.4.39
plugin_finder_jevents : 3.4.39
plugin_installer_jeventsinstaller : 3.4.39 (not enabled)
plugin_search_eventsearch : 3.4.39
plugin_system_gwejson : 3.4.39


Kind regards
Christof
7 years ago
·
#188478
0
Votes
Undo
I had that problem
on line 1059 of defaultloadedfromtemplate you have this statement:
$timedelta = $row->noendtime() ? "" : $row->getUnixEndTime() - $row->getUnixStartTime();

if you replace it with:
$timedelta = $row->noendtime() ? 0 : $row->getUnixEndTime() - $row->getUnixStartTime();

(simply a replacement of "" by 0, as "" is a string and hence not a numeric value)
does that fix your problem?
7 years ago
·
#188489
0
Votes
Undo
Thank you. In defaultloadedfromtemplate.php on line 1083 we have
$days = intval($timedelta / (60 * 60 * 24));

and on line 1084 we have
$timedelta -= $days * 60 * 60 * 24;

What changes do you suggest there? However, I think this is a Jevents bug that should be resolved in an upcoming version. That's the reason for my report.
7 years ago
·
#188518
0
Votes
Undo
hi,
the update to line 1059 fixes line 1083 because now if $timedelta is 0 it doesn't cause an error, whereas before it was trying to divide a string by a number. Similarly on line 1084 subtraction works if $timedelta is 0
php7 issues many more warnings and notices than previous versions which is why you are only now seeing the error when you upgrade.
7 years ago
·
#188543
0
Votes
Undo
Note, JEvents hasn't been tested fully on PHP7.1 yet and we advised PHP 7.0.

Many thanks
Tony

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!Join the JEvents club today!

7 years ago
·
#188569
0
Votes
Undo
heleneross - thanks for your insights we'll change the declaration of $timedelta for the next release of JEvents.

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

6 years ago
·
#208473
0
Votes
Undo
PHP 7.0 is completely outdated. I hope the next update of JEvents/RSVP Pro will be soon, and fully PHP 7.2+ compliant.
6 years ago
·
#208475
0
Votes
Undo
PHP 7.0 is completely outdated. I hope the next update of JEvents/RSVP Pro will be soon, and fully PHP 7.2+ compliant.

In the meantime, Jevents should be fully PHP 7.3 compliant. I am using Jevents 3.4.48 on several websites based on PHP 7.3

Kind regards
Christof
  • Page :
  • 1
There are no replies made for this post yet.

Members Area

Show your support

Unlike many Joomla calendars we do not charge to download JEvents - please show your support for this project by becoming a member of the JEvents Club Club members get access to early releases, exclusive member support forums, and Silver and Gold members can use many exciting JEvents addons

Your membership will ensure that JEvents continues to be the best events calendar for Joomla.