Support » Plugin: Custom Permalinks » Fatal Error with PHP 8.0

  • Resolved amaurya575


    Fatal error: Array and string offset access syntax with curly braces is no longer supported in /wp-content/plugins/al-custom-permalink/al-custom-permalink.php on line 246

    Current Code:

    return ($string{0} == '/' ? '/' : '') . trailingslashit($url['path']) . $_CPRegisteredURL;

    I just edited it directly in my plugin and it worked but it will be great if you can update it in a new update release.

    New Updated Code: Just replace the curly braces ( “$string{0}” ) with ( “$string[0]” ).

    return ($string[0] == '/' ? '/' : '') . trailingslashit($url['path']) . $_CPRegisteredURL;

    Thanks in advance.

    • This topic was modified 7 months, 1 week ago by amaurya575.
Viewing 1 replies (of 1 total)
  • Plugin Author Sami Ahmed Siddiqui


    @amaurya575 Have you customized the plugin? Plugin folder name should be “custom-permalinks” whereas in your shared error folder name is “al-custom-permalink”.

    Secondly, the error you are reporting was already fixed along time ago.

    If you have made customization then please migrate your changes to the LATEST version of the plugin.


Viewing 1 replies (of 1 total)
  • The topic ‘Fatal Error with PHP 8.0’ is closed to new replies.