• Resolved jacobreimann

    (@jacobreimann)


    I am getting PHP errors (see below) how can I fix this? I have the latest plugin version

    WarningUndefined variable $current_user-

    1. wp-content/plugins/insert-headers-and-footers/includes/class-wpcode-snippet-execute.php(287) : eval()’d code:5
    2. eval()
      wp-content/plugins/insert-headers-and-footers/includes/class-wpcode-snippet-execute.php:287
    3. WPCode_Snippet_Execute->safe_execute_php()
      wp-content/plugins/insert-headers-and-footers/includes/execute/class-wpcode-snippet-execute-universal.php:36
    4. WPCode_Snippet_Execute_Universal->prepare_snippet_output()
      wp-content/plugins/insert-headers-and-footers/includes/execute/class-wpcode-snippet-execute-type.php:55
    5. WPCode_Snippet_Execute_Type->get_output()
      wp-content/plugins/insert-headers-and-footers/includes/class-wpcode-snippet-execute.php:142
    6. WPCode_Snippet_Execute->get_snippet_output()
      wp-content/plugins/insert-headers-and-footers/includes/auto-insert/class-wpcode-auto-insert-type.php:385
    7. WPCode_Auto_Insert_Type->output_location()
      wp-content/plugins/insert-headers-and-footers/includes/auto-insert/class-wpcode-auto-insert-site-wide.php:70
    8. WPCode_Auto_Insert_Site_Wide->insert_header()
      wp-includes/class-wp-hook.php:324
    9. do_action('wp_head')
      wp-includes/general-template.php:3050
    10. wp_head()
      wp-content/themes/buddyboss-theme/header.php:17
    11. load_template('wp-content/themes/buddyboss-theme/header.php')
      wp-includes/template.php:745
    12. locate_template()
      wp-includes/general-template.php:48
    13. get_header()
      wp-content/themes/buddyboss-theme/page.php:15

    1Plugin: insert-headers-and-footersWarningAttempt to read property “name” on null-

    1. wp-content/plugins/insert-headers-and-footers/includes/class-wpcode-snippet-execute.php(287) : eval()’d code:5
    2. eval()
      wp-content/plugins/insert-headers-and-footers/includes/class-wpcode-snippet-execute.php:287
    3. WPCode_Snippet_Execute->safe_execute_php()
      wp-content/plugins/insert-headers-and-footers/includes/execute/class-wpcode-snippet-execute-universal.php:36
    4. WPCode_Snippet_Execute_Universal->prepare_snippet_output()
      wp-content/plugins/insert-headers-and-footers/includes/execute/class-wpcode-snippet-execute-type.php:55
    5. WPCode_Snippet_Execute_Type->get_output()
      wp-content/plugins/insert-headers-and-footers/includes/class-wpcode-snippet-execute.php:142
    6. WPCode_Snippet_Execute->get_snippet_output()
      wp-content/plugins/insert-headers-and-footers/includes/auto-insert/class-wpcode-auto-insert-type.php:385
    7. WPCode_Auto_Insert_Type->output_location()
      wp-content/plugins/insert-headers-and-footers/includes/auto-insert/class-wpcode-auto-insert-site-wide.php:70
    8. WPCode_Auto_Insert_Site_Wide->insert_header()
      wp-includes/class-wp-hook.php:324
    9. do_action('wp_head')
      wp-includes/general-template.php:3050
    10. wp_head()
      wp-content/themes/buddyboss-theme/header.php:17
    11. load_template('wp-content/themes/buddyboss-theme/header.php')
      wp-includes/template.php:745
    12. locate_template()
      wp-includes/general-template.php:48
    13. get_header()
      wp-content/themes/buddyboss-theme/page.php:15

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @jacobreimann,

    The errors you are seeing are originating in the code of your PHP snippets. You can find the first snippet by searching for “current_user” in the list of snippets search box in the top right.

    For the second error you can try searching for “->name“.

    You will have to make changes to your code to add checks in place to avoid these errors.

    • This reply was modified 7 months, 2 weeks ago by Mircea Sandu. Reason: code
    Thread Starter jacobreimann

    (@jacobreimann)

    ok thanks for your help will have a look ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP Errors – see below’ is closed to new replies.