[CONFIRMED] Fatal error in cb.database (php 5.0.5)

12 years 3 months ago #42305 by Vettriano01
I installed the formerly released CB 1.1 suite on a recently upgraded 1.0.13 Joomla environment. Whenever I want to access the CB functionality (back-end or front-end) i get this error:

[code:1]Fatal error: Only variables can be passed by reference in /usr/local/WWW/A/.5c2/n/nnc/htdocs/cms/administrator/components/com_comprofiler/library/cb/cb.database.php on line 530[/code:1]
Note:
I am not using the root of my webserver, but am building the site one floor up as in: www.blabla.com/cms

Installation process seems to work out fine, no errors reported there

I tried disabling down open-sef, but to no avail...

I use no hacks in the joomla code.

I am anxious to use the component, thanks for all the good work!

EDIT: changed title to prefix confirmed.

Post edited by: beat, at: 2007/08/10 13:42
12 years 3 months ago #42375 by brivox
I'm having the same problem. Any solution?
12 years 3 months ago #42425 by beat
Yup, smells like a little bug for a given php version... :(

Which PHP version do you have ? ? ?

in line 450 of same file administrator/components/com_comprofiler/library/cb/cb.database.php , replace this:

[code:1] function & _nullToArray( &$resultArray ) {[/code:1]

by this:

[code:1] function & _nullToArray( $resultArray ) {[/code:1]

( remove the & after the "(" )


Please report back here if it fixed your problem, and the exact php version you have (System->system info), me curious how this didn't come out in our tests.... ;)

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info
12 years 3 months ago #42448 by orgarob
Humm..fixing line 450 was probably easier than my fix.
I have php 5.0.5 and I made the following changes to fix this.

Open the file...
administrator/components/com_comprofiler/library/cb/cb.database.php

change line 530 from:
return $this->_nullToArray( $this->_db->loadObjectList( $key ) );

to:
$foo=$this->_db->loadObjectList( $key );
return $this->_nullToArray( $foo );

And then change line 460 From

return $this->_nullToArray( $this->_db->loadResultArray( $numinarray ) );

To:
$foo = $this->_db->loadResultArray( $numinarray );
return $this->_nullToArray( $foo );
12 years 3 months ago #42452 by Vettriano01
Beat,

As requested, my system info. Your fix solved the problem, everything works like a dream! If I come accross any other issues I'll be sure to post them here.

Will a future release contain this fix? I am trying to minimize manual hacks to the website...

Thanks for your work! Keep it up!

Database Version: 5.0.26-log
PHP Version: 5.0.5
Web Server: Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.7d
WebServer to PHP interface: cgi
Joomla! Version: Joomla! 1.0.13 Stable [ Sunglow ] 21 July 2007 16:00 UTC
User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)

Relevant PHP Settings: Joomla! Register Globals Emulation: OFF
Register Globals: OFF
Magic Quotes: ON
Safe Mode: OFF
File Uploads: ON
Session auto start: OFF
Session save path: none
Short Open Tags: ON
Output Buffering: OFF
Open basedir: none
Display Errors: ON
XML enabled: Yes
Zlib enabled: Yes
Disabled Functions: none

12 years 3 months ago #42468 by beat
Vettriano01 wrote:

...
Will a future release contain this fix? I am trying to minimize manual hacks to the website...

Thanks for your work! Keep it up!


Thanks.

Yes, of course this will be fixed, but maybe slightly differently (this fix was optimized to be easy to apply ;) ).

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info
Moderators: beatnantkrileon
Time to create page: 0.440 seconds
Facebook Twitter Google LinkedIn