Error Message: Deprecated: Assigning the return value of new by ref...

Support forum dedicated to free and advanced Joomla content presentation module with various layout options and data sources support.
GK User
Fri Nov 05, 2010 4:25 pm
Hello,

everything is fine with the modul news show pro gk3, header, image and text have the correct position. But above the header of my first art there is following message:

Deprecated: Assigning the return value of new by reference is deprecated in /webspace/10/52676/wissensblatt.de/modules/mod_news_show_gk3/mod_news_show_gk3.php on line 25

My server is united domains.

How can I solve that problem?

Thanks for your answers.
User avatar
Fresh Boarder

teitbite
Sat Nov 06, 2010 4:48 pm
Hi

Are You sure that the "module id" is diffrent for every instant of this module on this page ?

If You are than please simply change the level of showing errors to "None" at joomla panel global configuration for server. This is not a critical error so can be left but may be hidden.
User avatar
Moderator

GK User
Sat Nov 06, 2010 6:03 pm
hi,

thanks, but at the moment there is just one module on my page. I set the configuration on "none". Sorry, the message stay where it is. Maybe an another advice?

bye
Michael
User avatar
Fresh Boarder

teitbite
Sun Nov 07, 2010 11:33 pm
Hi

Than You need to hide this errors in php.ini file on Your server. Please search the forum on how to find it and what to change if You need that informations.
User avatar
Moderator

GK User
Mon Nov 15, 2010 12:47 pm
Hi,

my hoster creates a htaccess file with this content

php_flag display_errors off

BUT it works only for the homepage and not for the other sites. What can I do as next to hide the error message?

thanks
User avatar
Fresh Boarder

teitbite
Tue Nov 16, 2010 11:53 pm
Hi

Try to put that line in index.php in template's folder:

Code: Select all
ini_set('display_errors', 0);


or go to the line where the message is showing error and place @ befor the line.
User avatar
Moderator

GK User
Wed Nov 17, 2010 12:20 am
Hi

Do you have joomla updated to latest version?
What PHP version do you have on your host?
If you have PHP 5.3 and joomla not updated, this might be the reason.

Cheers ;)
User avatar
Platinum Boarder

GK User
Wed Nov 17, 2010 10:50 am
hi,
thanks for your help. No changes, when I put your code line in index.php file. A line with showing error doesn't exist there, so I wasnt to able to place an @.

My Joomla is updated on the newest version 1.5.22 and my hoster uses php 5.3.

This probleme also exists in the modul Gk Embed Media.
User avatar
Fresh Boarder

GK User
Fri Nov 26, 2010 9:42 am
hi,

sorry, i found the line, but it doesnt works.

bye
User avatar
Fresh Boarder

GK User
Sat Dec 18, 2010 5:27 pm
i think i found the solution

The problem is in the changes between PHP4 and PHP5, regarding referencing an object.
in PHP4 the referencing is done as follows: $object1 =& $object2; notice the ampersand('&') after the equals sign.
in PHP5 the referencing is being made automatically, means you don't have to use the ampersand sign anymore:
$object1 = $object2;
All you have to do is get into the problematic file, down to the error line, and erase the &.
Conclusion: the 'Deprecated' message is here to notice that the '&' use still works, but it might not be working as expected on newer PHP versions.
User avatar
Fresh Boarder


cron