Zen Cart Logo
Forums / General Questions / Occurred out of nowhere--Fatal error: Call to a member function format() in ot_gv.php

Occurred out of nowhere--Fatal error: Call to a member function format() in ot_gv.php

Locked

Views: 1,052

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
23 Apr 2008, 12:07 AM
#1
mooncavecrystals avatar

mooncavecrystals

Zen Follower

Join Date:
Sep 2006
Posts:
455
Plugin Contributions:
0

Occurred out of nowhere--Fatal error: Call to a member function format() in ot_gv.php

I went to double check the modules/order total to make SURE the red dot for Gift Certificates was on and got this message

Fatal error: Call to a member function format() on a non-object in /includes/modules/order_total/ot_gv.php on line **49

WHAT THE???
**

Line 49 has this code:

$this->checkbox = $this->user_prompt . '<input type="text" size="6" onkeyup="submitFunction()" name="cot_gv" value="' . number_format($_SESSION['cot_gv'], 2) . '" onfocus="if (this.value == \'' . number_format($_SESSION['cot_gv'], 2) . '\') this.value = \'\';" />' . ($this->user_has_gv_account($_SESSION['customer_id']) > 0 ? '<br />' . MODULE_ORDER_TOTAL_GV_USER_BALANCE . $currencies->format($this->user_has_gv_account($_SESSION['customer_id'])) : '');

Is it possible that when reinstalling another module that it overwrote something? To answer my own question, no, I compared my retail site files and wholesale site files and they are the same. I even reinstalled the retail file to the wholesale file. It worked for about an hour, then went all weird again (like above).

I am now officially freaking out :) It was fine yesterday!

25 Apr 2008, 6:24 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Occurred out of nowhere--Fatal error: Call to a member function format() in ot_gv.php

Could it be that your data-purging is causing you some troubles?
http://www.zen-cart.com/forum/showthread.php?t=94318

Or maybe you're using out-of-date code?
Or, as you said, maybe you've busted something with addons/mods that you've installed.

25 Apr 2008, 3:59 PM
#3
mooncavecrystals avatar

mooncavecrystals

Zen Follower

Join Date:
Sep 2006
Posts:
455
Plugin Contributions:
0

Re: Occurred out of nowhere--Fatal error: Call to a member function format() in ot_gv.php

It's just the weirdest thing :) It would give a fatal error. I would close the program and my browser. Reopen both and it would be fine.

I had just done a back up, so I restored that and it appears to be working fine now.

I do know that my hoster at some point was updating the sql databases, so maybe it was just odd timing. shrug

Anyway, now it works, so will keep my fingers crossed....LOL :wacko:

Thanks!!