Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9080531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T20:05:47+00:00 2026-06-16T20:05:47+00:00

Possible Duplicate: Assigning the return value of new by reference is deprecated I’m trying

  • 0

Possible Duplicate:
Assigning the return value of new by reference is deprecated

I’m trying to correct some mistakes that are displayed in my website, but I can not get rid of them.

For the following code:

    $string = preg_replace('# +#', ' ', $string);
    if($useHtml2text){
        $string=new html2text($string);
        $string=$string->get_text();
    }
    return trim($string);
}

I have this mistake

Deprecated: Assigning the return value of new by reference is deprecated in /htdocs/modules/googleshopping/class/myTools.php on line 56

the line concerned is this one

$string=new html2text($string);

I’ve tried almost everything but it is still there.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T20:05:48+00:00Added an answer on June 16, 2026 at 8:05 pm

    The errant code isn’t in your script, but in /htdocs/modules/googleshopping/class/myTools.php on line 56.

    A bit of time in Google suggests that this is a Prestashop module of some sort? Take it up with the module author. Tell them to get their act in gear, new-by-ref has been bad practice since PHP 5.0. Considering that the top Google result is also complaining about deprecated errors (about ereg — ewwwww), I wish you luck. You might want to find an alternate module…

    In the mean time, if you’re seeing this on a production site, you’ll want to turn off deprecated notices by adjusting error_reporting wherever most appropriate for your code, either in your init / bootstrap file or in php.ini.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: conditional statement and assigning value in ruby While refactoring some rails code,
Possible Duplicate: Unsigned long with negative value Assigning negative numbers to an unsigned int?
Possible Duplicate: Attaching Eventhandler with New Handler vs Directly assigning it I noticed there
Possible Duplicate: Why do I see a double variable initialized to some value like
Possible Duplicate: Can a local variable's memory be accessed outside its scope? return reference
Possible Duplicate: Why would you use the ternary operator without assigning a value for
Possible Duplicate: Assigning a substitute value in case of nil In Lua I use
Possible Duplicate: Explicitly assigning values to a 2D Array? sorry if this has been
Possible Duplicate: C integer overflow behaviour when assigning to larger-width integers I haven't found
Possible Duplicate: Can’t create handler inside thread that has not called Looper.prepare() inside AsyncTask

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.