• I am seeing a series of errors in the admin view whenever I’m logged in as a Section Editor user on my site. The errors are as follows:
    Notice: Undefined offset: 0 in /var/www/html/wp-content/plugins/bu-section-editing/classes.capabilities.php on line 76

    Notice: Undefined offset: 0 in /var/www/html/wp-content/plugins/bu-section-editing/classes.capabilities.php on line 80

    Notice: Trying to get property of non-object in /var/www/html/wp-content/plugins/bu-section-editing/classes.capabilities.php on line 159

    Notice: Trying to get property of non-object in /var/www/html/wp-content/plugins/bu-section-editing/classes.capabilities.php on line 161

    Steps to reproduce:

    • Set up a basic WordPress 4.7 site with no plugins. Make sure that the active theme is the default Twenty-Seventeen theme (this error occurs with all themes, but using the default rules out weird functions.php conflicts). Server is running PHP 5.6.30.
    • As an administrator account, install and activate the BU Navigation and BU Section Editing plugins.
    • Create a new user. Assign them the role of “Section Editor”.
    • Create a new Section Group. Give it a name and some content that can be edited. Assign the new user to this section group and save it.
    • Log out of the admin account and log back in as the new section editor account

    The error messages from above are repeated on all pages in the WordPress admin area. No menus are visible in the sidebar.

    • This topic was modified 7 years, 10 months ago by jajanowiak. Reason: Trying to improve error code formatting
    • This topic was modified 7 years, 10 months ago by jajanowiak. Reason: Another code formatting update
    • This topic was modified 7 years, 10 months ago by jajanowiak.
    • This topic was modified 7 years, 10 months ago by jajanowiak.
Viewing 1 replies (of 1 total)
  • Plugin Contributor Inderpreet Singh

    (@inderpreet99)

    Hi @jajanowiak,

    Those are PHP Notices. They usually appear if you have WP_DEBUG set to true in wp-config.php. WP_DEBUG should be disabled in a production setting.

    I can understand that the errors showing up in a development environment, can be bothersome. For the time being, you can add define( 'WP_DEBUG_DISPLAY', false ); to your wp-config.php to make the errors not be shown. I think they would still show up in your server/PHP error_logs as well as any other wp/plugin/theme code you wish to debug in the development environment.

    I will look to see if I can handle the erroneous states, so the errors are never generated.

    Thanks for the error report.

Viewing 1 replies (of 1 total)
  • The topic ‘PHP Errors with Basic Installation’ is closed to new replies.