Solve PHP error: "Deprecated: Assigning the return value of new ..."

Instructions: Battery replacement for the Ion Audio Blockrocker

Icon instructionsToday I moved an old script (a [Social Bookmarking Catalog-> social-bookmarking-directories], based on [Scuttle-> scuttle]) to a new hosting. Unfortunately, some errors occurred after the move. The most common one was a PHP error with the message "Deprecated: Assigning the return value of new ..." and then the file name and line number were specified. I assume this error is due to the newer PHP version running on the new hosting (I booked it with [All-Inkl-> all-inkl-Hosting]).

Fortunately, there is a relatively simple solution for this PHP error, so that you don't have to rebuild the whole script. The correction goes as follows:

In the file mentioned in the PHP warning you will probably find an entry like this one in the corresponding line:

$form =& new stdClass();

It depends less on the variables or the function than on the "&" that is hidden in the programming. This is deleted out, so that the call looks something like this afterwards:

$form = new stdClass();

Then you save the file or reload it on the server and call up the website again. One of the errors and warnings from PHP should now be resolved.

-
Do you like my blog? Then I would be happy to receive a short review on Google. Easy leave something here for a moment - that would be great, thank you!

 

Effectively for free: iPhone 13 Mini and iPhone 13 deals with top conditions at Otelo - Advertisement

Leave a Comment

Your e-mail address will not be published. Required fields are marked with * .