• Resolved Yworld

    (@yworld)


    Hello.
    Trying to fix the php 8 warning.
    File powered-cache/ includes/functions.php line 227(PHP Warning: Undefined array key “path”):
    $sub_dir = $url_info['host'] . $url_info['path'];

    Replace:
    $sub_dir = $url_info['host'] . ( isset($url_info['path']) ? $url_info['path'] : '' );

    It seems to work, but I don’t know if this is correct or not?

    • This topic was modified 2 years, 10 months ago by Yworld.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mustafa Uysal

    (@m_uysl)

    Hi @yworld,

    That makes sense, I think path does not exist when the given URL exactly matches the host (without trailingslash), PHP 8 might change notices to warning when you try to access a non-existing key, because parse_url used to be working as before.

    I will fix this in the next version but there is no ETA yet.

    Thanks for reporting,

    Thread Starter Yworld

    (@yworld)

    @m_uysl
    Thanks, great news!

    Plugin Author Mustafa Uysal

    (@m_uysl)

    @yworld This has been addressed in the new version (2.0) of the Powered Cache. Thanks for the feedback.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Eliminate PHP warning’ is closed to new replies.