TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 629
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 468
  • Total: 468

timestamp error?

Started by tomtom9800, June 29, 2008, 05:06:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

tomtom9800

Okay I tried those suggested and at first I received a parse error, so I took the first line and added a ; at the end of it.....everything is working, but now the forum error log shows this:

8: strtotime() [<a href='function.strtotime'>function.strtotime</a>]: Called with empty time parameter
File: C:\Inetpub\wwwroot\aceshigh.ws\wwwroot\forum\Themes\default\TPortal.template.php (eval?)
Line: 88

Did I not do something correct?

JPDeni

Sorry about the missing ; That happens from time to time.

I'm not sure what's on line 88 any more, with changes that have been made. I don't know why it's doing this.

tomtom9800

Hey thanks for all the help JP,  Maybe one day it will be a self fixer LOL

IchBin

Would checking to see if $row['birthdate'] is empty before trying to run strtotime() on it work?

JPDeni

The thing is that it shouldn't be empty. As I understand it, prior to this section of code there has been a search for the birthdays. The only ones that should be processed are the ones that we already know have birthdays.

IchBin

Doesn't strtotime require a value to calculate against? Looking at the php site,
strtotime (string, int)

Ianedres

Per http://www.php.net/manual/en/function.strtotime.php,

Returns a timestamp on success, FALSE otherwise. Previous to PHP 5.1.0, this function would return -1 on failure.

Wouldn't hurt to echo the value out- just to make sure you're getting something.


JPDeni

Quote from: IchBinâ,,¢ on July 02, 2008, 08:50:14 PM
Doesn't strtotime require a value to calculate against? Looking at the php site,
strtotime (string, int)

The integer is optional.

Quote
int strtotime ( string $time [, int $now ] )

The function expects to be given a string containing a US English date format and will try to parse that format into a Unix timestamp (the number of seconds since January 1 1970 00:00:00 GMT), relative to the timestamp given in now , or the current time if now is not supplied.

I might be able to work it out if I had what line 88 is, but since I'm not sure after edits and such, I can't tell.

tomtom9800

Jp I would give you admin rights if you would like to take a look or if you would like for me to send you the file I would do it as long as I can trust you lol, jk

JPDeni

Hang on a bit. It would be better if I worked on this when I feel better.

This website is proudly hosted on Crocweb Cloud Website Hosting.