• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Resolved PHP 8.2 - Deprecated function: Using ${var}

Jürgen_T

Regular Pleskian
Since I upgraded from php 8.1 to php 8.2 I got some deprecation warnings like "Deprecated function: Using ${var} in strings is deprecated, use {$var} instead" In some cases I could solve it by replacing used variables i.e. ${var} by ${var}.

But I have no idea how to solve this following warning by Drupal 10:

Deprecated function: Using ${var} in strings is deprecated, use {$var} instead in include() (line 571 of /var/www/vhosts/tenckhoff.de/httpdocs/vendor/composer/ClassLoader.php)

On line 571 I found the following code:

569 function includeFile($file)
570 {
571 include $file;
572 }

Is there any proposal what I can try to get rid of this deprecation warning?
 

or in Plesk set the error reporting level for your PHP scripts from the drop down (or enter your individual setting):

1682930608841.png

However, it is likely that your script sets its own error_reporting() so that will override the general setting of PHP via Plesk. It is best to control error reporting with the error_reporting() function in a script, e.g.
error_reporting(0)
to disable all (on production systems, not recommend on development systems).
 
Hi Peter, thank you for the quick advice - this helped! Now I got rid of the message in the prod. environment and have time to find a general solution for the concerned deprecated files:)
 
Back
Top