• Resolved lerrie

    (@lerrie)


    Dear developer,

    On my website I am getting the following error when I turn on the wordpress debug mode. What is going wrong here and how can I fix it?

    Notice: Undefined index: path in /home/vhosts/transferpersshop.nl/httpdocs/wp-content/plugins/custom-permalinks/custom-permalinks.php on line 271

    Line 271 says: $request = ltrim(substr($string, strlen($url['path'])),'/');

    Does anyone else have this problem?

    Kind regards

    https://wordpress.org/plugins/custom-permalinks/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter lerrie

    (@lerrie)

    Someone?

    Just ran into this myself, and fixed it by checking to make sure the variable in question was not empty.
    So, replace this (on line 271):

    $request = ltrim(substr($string, strlen($url['path'])),'/');

    with this:

    if ( ! empty( $url['path'] ) ) {
            $request = ltrim(substr($string, strlen($url['path'])),'/');
    } else {
            $request = ltrim($string, '/');
    }

    It’s not really an error, but it results from having a site that is setup at the root of your web directory (not in a sub-folder).

    Thread Starter lerrie

    (@lerrie)

    Perfect! Thanks a lot!

    Nice, I’m still having this issue with Custom Permalinks, can the fix get patched in?

    It’s not really “resolved” as the fix will disappear every time we upgrade.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Notice: Undefined index’ is closed to new replies.