WordPress.org

Forums

P3 (Plugin Performance Profiler)
[resolved] PHP STRICT Warning "Only variables should be passed by reference" (3 posts)

  1. Dean Taylor
    Member
    Posted 2 years ago #

    Hi,

    Noticed the following warning / error in my logs:

    URL: http://example.com/wp-admin/network/settings.php
    Referrer: http://example.com/wp-admin/network/plugins.php
    Error(E_STRICT): Only variables should be passed by reference
    Source: /var/sites/g/example.com/public_html/wp-content/plugins/p3-profiler/p3-profiler.php [56]
    
    Trace:
    #1 /var/sites/g/example.com/public_html/wp-admin/network/settings.php:11 - require_once('/var/si...')
    #2 /var/sites/g/example.com/public_html/wp-admin/network/admin.php:13 - require_once('/var/si...')
    #3 /var/sites/g/example.com/public_html/wp-admin/admin.php:30 - require_once('/var/si...')
    #4 /var/sites/g/example.com/public_html/wp-load.php:29 - require_once('/var/si...')
    #5 /var/sites/g/example.com/public_html/wp-config.php:163 - require_once('/var/si...')
    #6 /var/sites/g/example.com/public_html/wp-settings.php:195 - include_once('/var/si...')
    
    POST:
    array (
    )
    
    GET:
    array (
    )

    This is probably an easy fix, it seems the use of the end function isn't quite correct according to the docs for the single parameter passed in:

    This array is passed by reference because it is modified by
    the function. This means you must pass it a real variable and not
    a function returning an array because only actual variables may be
    passed by reference.

    Cheers,
    Dean.

    http://wordpress.org/extend/plugins/p3-profiler/ version 1.4.1

  2. Chris Klosowski
    Member
    Posted 2 years ago #

    Thanks Dean,

    I'll go ahead and note this to see if we can get this fixed in the next release. I appreciate the great debug info you provided.

  3. Dean Taylor
    Member
    Posted 2 years ago #

    No problem Chris, thanks for the update.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • P3 (Plugin Performance Profiler)
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic