Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

adding the ebay listing addon ?


Guest

Recommended Posts

i am trying to impliment the ebay listing addon and i am getting this error on my website ( www.pcncautomation.net ) when the button is clicked

 

 

Warning: mktime() expects parameter 2 to be long, string given in /home/rvrwind/public_html/includes/modules/current_auctions_module.php on line 116

 

Warning: mktime() expects parameter 4 to be long, string given in /home/rvrwind/public_html/includes/modules/current_auctions_module.php on line 116

 

 

but after the warnings it displays the ebay listing i have

 

here is the code that is in current_auctions_module.php

 

$seperate[0] = str_replace("Oct", "10", $seperate[0]);

$seperate[0] = str_replace("Nov", "11", $seperate[0]);

$seperate[0] = str_replace("Dec", "12", $seperate[0]);

 

$month = $seperate[0];

$day = $seperate[1];

$year = $seperate[2];

$hour = $seperate[3] + AUCTION_TIMEZONE;

$minute = $seperate[4];

$second = $seperate[5];

 

// mktime is the marked time, and time() is the current time.

$target = mktime($hour,$minute,$second,$month,$day,$year); ( this is line 116 )

$diff = $target - time();

 

$days = ($diff - ($diff % 86400)) / 86400;

$diff = $diff - ($days * 86400);

$hours = ($diff - ($diff % 3600)) / 3600;

$diff = $diff - ($hours * 3600);

$minutes = ($diff - ($diff % 60)) / 60;

$diff = $diff - ($minutes * 60);

$seconds = ($diff - ($diff % 1)) / 1;

 

// next we put it into a presentable format

 

 

what do i need to do to get rid of this error ?

Link to comment
Share on other sites

Typecast the parameters:

 

$target = mktime((int)$hour,(int)$minute,(int)$second,(int)$month,(int)$day,(int)$year);

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...