phpScheduleIt
June 19, 2013, 04:03:16 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: phpScheduleIt 2.4.2 has been released!
 
   Home   Help Login Register  
Pages: 1 [2]
  Print  
Author Topic: "Multiple Day Reservations" disable not working  (Read 34881 times)
hawrobin
Newbie
*

Karma: 0
Posts: 2


« Reply #15 on: October 18, 2007, 06:53:11 PM »

I followed strawboss's changes to the reserve.php file and I get the following error in the "Processing Reservation" window:

Warning: mktime() expects parameter 4 to be long, string given in /var/www/phpScheduleIt/lib/CmnFns.class.php on line 285

However, the booking page reloads and the new reservation is visible and it can be modified and deleted like any other reservation. Can you explain what this error message is and how to correct it?
Logged
Hans
Newbie
*

Karma: 0
Posts: 7


« Reply #16 on: March 19, 2008, 10:52:56 AM »

Hi!

In version 1.2.8 I get the same error message, along with this:

Quote

Notice: Undefined index: interval in C:\Program\EasyPHP\www\phpscheduleit\reserve.php on line 96

Notice: Undefined index: interval in C:\Program\EasyPHP\www\phpscheduleit\reserve.php on line 101

Notice: Undefined index: repeat_until in C:\Program\EasyPHP\www\phpscheduleit\reserve.php on line 101

Notice: Undefined index: frequency in C:\Program\EasyPHP\www\phpscheduleit\reserve.php on line 101

Notice: Undefined offset: 2 in C:\Program\EasyPHP\www\phpscheduleit\lib\CmnFns.class.php on line 284

Notice: Undefined offset: 1 in C:\Program\EasyPHP\www\phpscheduleit\lib\CmnFns.class.php on line 284

Warning: mktime() expects parameter 4 to be long, string given in C:\Program\EasyPHP\www\phpscheduleit\lib\CmnFns.class.php on line 285


However the reservation is made as it should. No error is displayed in the reservation menu. I had to make the changes in reserve.template on lines 96 & 949 instead of those mentioned above.

/hans
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5506


WWW
« Reply #17 on: March 20, 2008, 09:55:52 AM »

Try changing line 96 to this:

Code:
if (isset($_POST['interval']) && $_POST['interval'] != 'none') {
Logged
Hans
Newbie
*

Karma: 0
Posts: 7


« Reply #18 on: March 28, 2008, 06:20:07 AM »

Hi!

Thanks, but no luck. The reservation is made ok (however I now can not make reservations in near time, my local time is 11.15 and the closest reservation I can place as user is at 12.30???) but with the message;

Quote
Notice: Undefined index: interval in C:\Program\EasyPHP\www\phpscheduleit\reserve.php on line 96

Notice: Undefined index: interval in C:\Program\EasyPHP\www\phpscheduleit\reserve.php on line 101

Notice: Undefined index: repeat_until in C:\Program\EasyPHP\www\phpscheduleit\reserve.php on line 101

Notice: Undefined index: frequency in C:\Program\EasyPHP\www\phpscheduleit\reserve.php on line 101

Notice: Undefined offset: 2 in C:\Program\EasyPHP\www\phpscheduleit\lib\CmnFns.class.php on line 284

Notice: Undefined offset: 1 in C:\Program\EasyPHP\www\phpscheduleit\lib\CmnFns.class.php on line 284

Warning: mktime() expects parameter 4 to be long, string given in C:\Program\EasyPHP\www\phpscheduleit\lib\CmnFns.class.php on line 285


I´m not sure I´ll further try to make this mod, since I do not think recurring reservations will be a problem. We´ll have to keep an eye at the schedules and see if any 'abuse' occurs.  :wink:

/hans
Logged
beernutz
Newbie
*

Karma: 0
Posts: 7


« Reply #19 on: October 24, 2008, 01:21:16 PM »

I followed strawboss's changes to the reserve.php file and I get the following error in the "Processing Reservation" window:

Warning: mktime() expects parameter 4 to be long, string given in /var/www/phpScheduleIt/lib/CmnFns.class.php on line 285

However, the booking page reloads and the new reservation is visible and it can be modified and deleted like any other reservation. Can you explain what this error message is and how to correct it?

Nick, are there any other suggestions to get rid of this warning.  I am using 1.2.8 and changed both lines 94 and 972 to:
Code:
if (Auth::isAdmin()) {

Like hawrobin says, everything seems to work the way I want after those changes except that that warning is displayed.
Logged
a-ciar
Newbie
*

Karma: 0
Posts: 6


« Reply #20 on: April 17, 2009, 04:17:47 PM »

If anyone is still have the following error:

Code:
Warning: mktime() expects parameter 4 to be long, string given in C:\Program\EasyPHP\www\phpscheduleit\lib\CmnFns.class.php on line 285

I believe this error is related to the version of PHP you are running and deprecated functionality of mktime(). In the newer version of mktime() you cannot pass strings. I fixed it by changing the following (again in 1.2.11):

FROM:
Code:
list($last_m, $last_d, $last_y) = explode('/', $until);
$last_ts = mktime(0,0,0,$last_m, $last_d, $last_y);

TO:
Code:
list($last_m, $last_d, $last_y) = explode('/', $until);

$lm = (int)$last_m;
$ld = (int)$last_d;
$ly = (int)$last_y;

$last_ts = mktime(0,0,0,$lm, $ld, $ly);

Here we just create 3 new variables and cast the strings to ints. I used new variables because I did not look closely through the code and was not sure if the original varaibles (as strings) are used later. Anyway, I know this is an old topic but thought I would help out anyone who is searching this error.
Logged
gvance
Newbie
*

Karma: 0
Posts: 7


« Reply #21 on: March 17, 2010, 04:43:08 PM »

Strawboss:

Your 3 fixes worked for me, perfectly.  Thanks!

G
Logged
Aringarosa
Newbie
*

Karma: 0
Posts: 4


« Reply #22 on: July 20, 2011, 07:54:45 AM »

It worked for me too, thank for your fixes!




« Last Edit: May 23, 2012, 02:56:38 AM by Aringarosa » Logged
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!