E_Deprecated (again) +captcha module

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
samj
Forum Members
Forum Members
Posts: 30
Joined: Mon Feb 28, 2011 4:31 am

E_Deprecated (again) +captcha module

Post by samj »

New to everything, except for Html and Css.
During my trial installs of csmms, I encountered several error messages including "Deprecated ..."
Reading through the many posts did not reveal much to me in terms of solutions other than E_Deprecated is not supported in this version of csmsm. I also found our that I have to change the corresponding settings in config.php to something like E_All & ~E_NOTICE, which I did; but the error message still shows (Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\OrgonePeak\modules\Captcha\lib\classes\captchalibs\class.captchalib_hncaptcha.php on line 118).

Thereafter, I went to the php manual which says: "Since PHP 5, new returns a reference automatically, so using =& in this context is deprecated and produces an E_DEPRECATED message in PHP 5.3 and later, and an E_STRICT message in earlier versions."

In layman's terms this basically says that we do not use this type of grammar any longer since php 5.x
The offending line (118): $this->object =& new hn_captcha_X1($CAPTCHA_INIT);

My limited understanding tells me to replace =& with something else. What would that be?
would it be more useful to contact the author directly in such a case, since changing the code in this way might break the program, or is it just a simple, general and common task, without dire consequences, to replace the "=&" with the appropriate ("new") grammar?

thanks

CMSms v1.9.4.1; Xampp home dev.; php5.x;
latest modules;
samj
Forum Members
Forum Members
Posts: 30
Joined: Mon Feb 28, 2011 4:31 am

Re: E_Deprecated (again) +captcha module

Post by samj »

Well, I eliminated the "&" in the offending line, which got rid of the error msg. BUT, I do not know if this is an appropriate fix or if this is going to bite me down the line and break something later.

samj
Post Reply

Return to “Modules/Add-Ons”