MODX Community

PHP code deprecation notice on installation

Hi Folks

I am using the latest Modx version (2.7.3)
Would anyone have any solutions to not seeing the following notice at the ‘Setup’ screen of the installation process.

Deprecated : Array and string offset access syntax with curly braces is deprecated in /Applications/MAMP/htdocs/some_website/setup/includes/parser/modinstallsmarty.class.php on line 75

Aside it feeling a tad irksome, would this be something to be concerned about if left?

My setup:
Mac High Sierra 10.13.6
PHP 7.4.2
MySql 5.7.26
Latest Safari and Chrome

Many thanks in advance

It seems by reverting the PHP version in Mamp from 7.4.2 to 7.3.9
the issue does not occur…

?

That line is:

  if ($dirname{strlen($dirname) - 1} == '/') $dirname = substr($dirname, 0, strlen($dirname) - 1);

I believe it should be:

if ($dirname(strlen($dirname) - 1)  == '/')  {
      $dirname = substr($dirname, 0, strlen($dirname) - 1);
}

Could you file that as a bug here?

At this point, it’s just a warning, but it will probably become a bug in future versions of PHP.

Many thanks Bob.

Looks like rutkas has already filed the same issue on 4th March

Cheers

Thanks for checking. :slight_smile: