catchable fatal error in table.php

Locked
User avatar
abedalmged
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Fri Nov 17, 2006 7:35 pm
Location: iksal
Contact:

catchable fatal error in table.php

Post by abedalmged » Tue Dec 12, 2006 4:50 am

i get this message (error) when pressing save or apply in any place in control panel (in articles, section, user manager...):
Catchable fatal error: Object of class JDatabaseMySQL could not be converted to string in /home/mysite/public_html/beta/libraries/joomla/database/table.php on line 678

and this is line 678 in /libraries/joomla/databases/table.php:
. "\n SET checked_out = 0, checked_out_time = '$this->_db->_nullDate'"

neverthless, everything were saved or applied when i press save or apply , but that error still bothering, what it could be?
thanks for any help, your replies and your efforts will advance joomla.
beta is to try and to find errors and here are the errors :-D

:-D
thanks in advance>
Abed Almajeed Ben Muhammad

User avatar
masterchief
Joomla! Hero
Joomla! Hero
Posts: 2247
Joined: Fri Aug 12, 2005 2:45 am
Location: Brisbane, Australia
Contact:

Re: catchable fatal error in table.php

Post by masterchief » Tue Dec 12, 2006 7:23 am

This has been fixed for the Beta 2 release.  However, to get you out of trouble, the line should read:

Code: Select all

"\n SET checked_out = 0, checked_out_time = ".$this->_db->Quote($this->_db->_nullDate) .
Thanks for the report.
Andrew Eddie - Tweet @AndrewEddie
<><
http://eddify.me
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.

User avatar
Mesqualito
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Jan 10, 2007 8:03 am
Location: Volkach, Germany
Contact:

Code correction

Post by Mesqualito » Wed Jan 10, 2007 8:18 am

I am not really a php-guy, but when I insert your code:

------------------------------------------------------------------------------------------------------------------------------------
"\n SET checked_out = 0, checked_out_time = ".$this->_db->Quote($this->_db->_nullDate) .
------------------------------------------------------------------------------------------------------------------------------------

i get some nice errors (under xampp Win XP SP2, installed yesterday night). When I put this:

-----------------------------------------------------------------------------------------------------------------------------------------
. "\n SET checked_out = 0, checked_out_time = '.$this->_db->Quote($this->_db->_nullDate) .'"
-----------------------------------------------------------------------------------------------------------------------------------------

everything works out fine.

I just mention this 'solution' from some trials I made (only to test my luckiness :-)
I don't know, if this is anything, that makes real sense - but it works...


Greetings and THANKS FOR JOOMLA !!!

Jochen




--------> Correction of my nasty Correction:

Now, the code works fine again.
But the problem remains:

Catchable fatal error: Object of class JDatabaseMySQL could not be converted to string in C:\XAMP1.5.5\xampp\htdocs\jambar\libraries\joomla\database\table.php on line 678


By the way: is there a possibility to link to only one album from expose4 ??
I would like to have different expose - albums linked from different links

....
Last edited by Mesqualito on Wed Jan 10, 2007 8:32 am, edited 1 time in total.

poppadum
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Jan 12, 2007 4:19 pm

Re: catchable fatal error in table.php

Post by poppadum » Fri Jan 12, 2007 4:28 pm

What you need to do is replace the existing line of code (line 678 in table.php) with:

. "\n SET checked_out = 0, checked_out_time = '" . $this->_db->Quote($this->_db->_nullDate) . "'"

You change was such that the checked_out_time variable in the constructed query wasn't being single-quoted properly.

I don't know PHP, but it looks like both the single-quote marks (before and after the $this->... expression) have to be inside a double-quoted string. The strings forming the UPDATE query are themselves are then joined using the dot "." concatenation operator.

This above worked for me.

Cheers,
-P


Locked

Return to “Joomla! 1.5 BETA”