Today 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.
Jens has been running the blog since 2012. He appears as Sir Apfelot for his readers and helps them with problems of a technical nature. In his free time he drives electric unicycles, takes photos (preferably with his iPhone, of course), climbs around in the Hessian mountains or hikes with the family. His articles deal with Apple products, news from the world of drones or solutions for current bugs.