• Hi Pod Team, I’m working on a legacy website with the pod plugin. We recently upgraded WordPress to the current version 6.6.2 and POD to 3.2.7.1, I see these warnings/error, can’t save any post.

    ??Warning: strlen() expects parameter 1 to be string, array given in?/wordpress/wp-content/plugins/pods/includes/data.php?on line?1601?? Deprecated: Function has_cap was called with an argument that is?deprecated?since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead. in?/wordpress/wp-includes/functions.php?on line?6085 .?

    Any advice how to resolve this?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @jayamsgq

    These are two separate PHP issues (a warning and a deprecation). Please also share a stack trace so we can validate where it’s coming from.

    You will probably find more information in your server logs.

    Cheers, Jory

    Plugin Support Paul Clark

    (@pdclark)

    Post save functionality can be restored by changing:

    • define( 'WP_DEBUG', true );
      to
      define( 'WP_DEBUG', false );
    • and adding display_errors( 0 );

    …to wp-config.php

    To resolve any deeper issues with what might be happening, please generate a backtrace (a report of what the code was doing when the error happened) by adding this to a Code Snippet:

    set_error_handler(
    function ( $number, $message, $file, $line ) {
    $type = false;
    switch( $number ) {
    case E_WARNING :
    if ( ! $type ) { $type = 'warning'; }
    case E_USER_WARNING :
    if ( ! $type ) { $type = 'user_warning'; }
    case E_STRICT :
    if ( ! $type ) { $type = 'strict'; }
    case E_NOTICE :
    if ( ! $type ) { $type = 'notice'; }
    case E_USER_NOTICE :
    if ( ! $type ) { $type = 'user_notice'; }

    file_put_contents(
    sprintf( '%s/debug-backtrace.log', WP_CONTENT_DIR ),
    str_replace(
    ABSPATH,
    '',
    print_r(
    [
    'type' => $type,
    'message' => $message,
    'file' => str_replace( ABSPATH, '', $file ),
    'line' => $line,
    'backtrace' => debug_backtrace(),
    ],
    true
    )
    ),
    FILE_APPEND
    );
    break;
    default:
    // Fatal error. Nothing can be done here.
    exit( 1 );
    break;
    }
    }
    );

    …then run the Save Post action again, and share the text saved to /wp-content/debug-backtrace.log here or in a GitHub issue.

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