phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

Topic Calendar + php7/8....


 
Search this topic... | Search MOD Writing... | Search Box
Register or Login to Post    Index » MOD Writing  Previous TopicPrint TopicNext Topic
Author Message
s1eelra1
Board Member



Joined: 08 Apr 2015

Posts: 33



PostPosted: Thu Mar 11, 2021 7:45 pm 
Post subject: Topic Calendar + php7/8....

I have found an error in the topic calendar which I posted about earlier here for help with the __contruct changes:

https://www.phpbb2refugees.com/viewtopic.php?t=2847

However, the most recent bug, is centred around the class_calendar_api.php. Because this file is referenced by a lot of the calendar functions/edits, places, it get's referenced quite a lot.

Quote:


Warning: Undefined array key "h" in /includes/class_calendar_api.php on line 123

Warning: Undefined array key "i" in /includes/class_calendar_api.php on line 123

Warning: Undefined array key "s" in /includes/class_calendar_api.php on line 123

Warning: Undefined array key "d" in /includes/class_calendar_api.php on line 123

Warning: Undefined array key "s" in /includes/class_calendar_api.php on line 123



The code for that one line, seems to do a lot of the date functions.... so depending on what "date" part it is, you can get multiple warnings/notices for the various letters. Always the same line of code.

Code:


   function cast($h, $i=0, $s=0, $m=0, $d=0, $y=0)
   {
      return is_array($h) ?
         array('h' => intval($h['h']), 'i' => intval($h['i']), 's' => intval($h['s']), 'm' => intval($h['m']), 'd' => intval($h['d']), 'y' => intval($h['y'])) :
         array('h' => intval($h), 'i' => intval($i), 's' => intval($s), 'm' => intval($m), 'd' => intval($d), 'y' => intval($y));
   }




So all the variations of stuff I know to try to define the index properly, hasn't worked yet.



TC122p0.zip
 Description:

Download
 Filename:  TC122p0.zip
 Filesize:  83.48 KB
 Downloaded:  198 Time(s)

Back to top
Vendethiel
Board Member



Joined: 26 Oct 2014

Posts: 228



PostPosted: Thu Mar 11, 2021 8:50 pm 
Post subject: Re: Topic Calendar + php7/8....

Probably something like

Code:
   function cast($h, $i=0, $s=0, $m=0, $d=0, $y=0)
   {
      return is_array($h) ?
         array('h' => isset($h['h']) ? intval($h['h']) : 0, 'i' => isset($h['i']) ? intval($h['i']) : 0, 's' => isset($h['s']) ? intval($h['s']) : 0, 'm' => isset($h['m']) ? intval($h['m']) : 0, 'd' => isset($h['d']) ? intval($h['d']) : 0, 'y' => isset($h['y']) ? intval($h['y']) : 0) :
         array('h' => intval($h), 'i' => intval($i), 's' => intval($s), 'm' => intval($m), 'd' => intval($d), 'y' => intval($y));
   }

_________________
Developer on EzArena, the ADR premod.
Developer on Icy Phoenix, the phpBB hybrid cms.
Developer on IntegraMOD, the full-featured premod.
Help me archive premods on github! (fixed for recent PHPs).
Back to top
s1eelra1
Board Member



Joined: 08 Apr 2015

Posts: 33



PostPosted: Sat Mar 13, 2021 9:15 pm 
Post subject: Re: Topic Calendar + php7/8....

Thanks for the attempt Vend... I really do appreciate it.

But that's a nope. I just tried your revision, and it did not have any impact.
Back to top
Display posts from previous:   
Register or Login to Post    Index » MOD Writing  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0265 seconds using 19 queries. (SQL 0.0025 Parse 0.0023 Other 0.0217)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo