Support » Plugin: WP Photo Album Plus » Undefined call to wp_get_current_user

  • Resolved Cacholong

    (@cacholong)


    Hi,

    When I tried upgrading to PHP 7.2, I get the following error:

    PHP message: PHP Fatal error: Redefinition of parameter $thisLink in WWWROOT/vhosts/www/htdocs/wp-content/plugins/wp-rss-multi-importer/inc/excerpt_functions.php on line 570
    PHP message: PHP Fatal error: Uncaught Error: Call to undefined function wp_get_current_user() in WWWROOT/vhosts/www/htdocs/wp-content/plugins/wp-photo-album-plus/wppa-users.php:68
    Stack trace:
    #0 WWWROOT/vhosts/www/htdocs/wp-content/plugins/wp-photo-album-plus/wppa-session.php(169): wppa_get_user()
    #1 WWWROOT/vhosts/www/htdocs/wp-includes/class-wp-hook.php(286): wppa_session_end(”)
    #2 WWWROOT/vhosts/www/htdocs/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
    #3 WWWROOT/vhosts/www/htdocs/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
    #4 WWWROOT/vhosts/www/htdocs/wp-includes/load.php(679): do_action(‘shutdown’)
    #5 [internal function]: shutdown_action_hook()
    #6 {main}
    thrown in WWWROOT/vhosts/www/htdocs/wp-content/plugins/wp-photo-album-plus/wppa-users.php on line 68

    Is there a way to fix this for PHP 7.2?

    Regards, Matthijs

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jacob N. Breetvelt

    (@opajaap)

    I did never see and do not have this error up to PHP 7.2.7. Is your wp version up to rev?
    Is the error reproduceable or is it intermittent or incidentially: how many messages are there?

    wp_get_current_user() is an existing wp function and should be available at any moment for a plugin.

    Thread Starter Cacholong

    (@cacholong)

    Weird, well the version of wordpress is:
    $ wp core version
    4.9.7

    and the plugin list is:
    $ wp plugin list
    +——————————–+——–+———–+————-+
    | name | status | update | version |
    +——————————–+——–+———–+————-+
    | ad-inserter | active | none | 2.3.14 |
    | akismet | active | none | 4.0.8 |
    | antispam-bee | active | none | 2.8.1 |
    | bunyad-siteorigin-panels | active | none | 1.3.7.5-mod |
    | bunyad-shortcodes | active | none | 1.0.6 |
    | bunyad-widgets | active | none | 1.0.5 |
    | cache-control-by-cacholong | active | none | 4.0.1 |
    | contact-form-7 | active | none | 5.0.3 |
    | cookie-law-info | active | available | 1.6.0 |
    | google-analytics-for-wordpress | active | none | 7.0.9 |
    | nextgen-gallery | active | none | 3.0.1 |
    | really-simple-captcha | active | none | 2.0.1 |
    | wp-rss-multi-importer | active | none | 3.15 |
    | velvet-blues-update-urls | active | none | 3.2.8 |
    | wp-pagenavi | active | none | 2.92 |
    | wp-photo-album-plus | active | none | 6.9.06.008 |
    | wordpress-seo | active | none | 7.8 |
    +——————————–+——–+———–+————-+

    As far as I can see it is up 2 date.

    The error is reproducable.

    Regards, Matthijs

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    What anout this error:

    PHP message: PHP Fatal error: Redefinition of parameter $thisLink in WWWROOT/vhosts/www/htdocs/wp-content/plugins/wp-rss-multi-importer/inc/excerpt_functions.php on line 570

    Try to de-activate wp-rss-multi-importer. and see if the other error is caused by this error

    Thread Starter Cacholong

    (@cacholong)

    Hm, I’ve missed the other ‘Fatal error’. After disabling the wp-rss-multi-importer everything worked fine.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Undefined call to wp_get_current_user’ is closed to new replies.