Joomla! Discussion Forums



It is currently Thu Nov 26, 2009 7:01 am (All times are UTC )

 




Post new topic Reply to topic  [ 4 posts ] 
Author Message
Posted: Tue Dec 12, 2006 4:50 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Fri Nov 17, 2006 7:35 pm
Posts: 13
Location: iksal
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


Top
  E-mail  
 
Posted: Tue Dec 12, 2006 7:23 am 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Fri Aug 12, 2005 2:45 am
Posts: 1581
Location: Toowoomba, Australia
This has been fixed for the Beta 2 release.  However, to get you out of trouble, the line should read:

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


Thanks for the report.

_________________
Andrew Eddie - Tweet @AndrewEddie
<><
http://www.theartofjoomla.com
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.


Top
   
 
 Post subject: Code correction
Posted: Wed Jan 10, 2007 8:18 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Jan 10, 2007 8:03 am
Posts: 12
Location: Volkach, Germany
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.

Top
   
 
Posted: Fri Jan 12, 2007 4:28 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Fri Jan 12, 2007 4:19 pm
Posts: 1
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


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

Quick reply

 



Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group