Support » Plugin: User Access Manager » front end site crash

  • Resolved wpo-HR

    (@wpo-hr)


    Hi,
    after recent updates my frontend was no longer available and crashed with the error message “Argument 1 passed to UserAccessManager\Controller\Frontend\PostController::showEditLink() must be of the type string, null given, called in /home/www/r-fotos.de/wp-include/class-wp-hook.php on line 289″.

    Maybe it is a good idea, to change the listed parameter definition. I replaced
    public function showEditLink(string $link, $postId): string
    by
    public function showEditLink( $link, $postId): string
    {
    if ( $link == null ) $link = ” ;
    and the error was gone.
    Best regards
    Harald

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author GM_Alex

    (@gm_alex)

    Hi @wpo-hr,

    should be fixed with the latest version 2.2.11.

    Regards,
    Alex

    Thread Starter wpo-HR

    (@wpo-hr)

    Hi Alex,
    sorry to say, but the error still exists on my website and the front end still crashes with the latest UAM release.
    The suggested workaround above still works for me.
    Defining the parameter in question as ?string does not solve the problem on my website. (I am using wp 5.7 and php 7.4.7. on linux server platform, website r-fotos.de)
    Regards,
    Harald

    Plugin Author GM_Alex

    (@gm_alex)

    Could you past the error massage again or is it the same, which would be super strange.

    Plugin Author GM_Alex

    (@gm_alex)

    Ok I think this is a new error, should be the following:

    
    UserAccessManager\Controller\Frontend\PostController::showEditLink() must be of the type string, null returned in /var/www/app/wp-content/plugins/user-access-manager/src/Controller/Frontend/PostController.php on line 531
    

    Should be fixed with 2.2.13

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.