Erro no banco de dados do WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND umt.meta_value NOT LIKE '%Contributor%' AND umt.meta_value NOT LIKE '%Subscr' at line 11]
SELECT u.ID, umt1.meta_value as last_update FROM wp_users as u LEFT JOIN wp_usermeta AS um ON ( u.ID = um.user_id AND um.meta_key = 'rank_math_robots' ) LEFT JOIN wp_usermeta AS umt ON ( u.ID = umt.user_id AND umt.meta_key = 'wp_capabilities' ) LEFT JOIN wp_usermeta AS umt1 ON ( u.ID = umt1.user_id AND umt1.meta_key = 'last_update' ) WHERE ( ( ( um.meta_key = 'rank_math_robots' AND um.meta_value NOT LIKE '%noindex%' ) OR um.user_id IS NULL ) AND ( umt1.meta_key = 'last_update' OR umt1.user_id IS NULL ) AND ( umt.meta_key ='wp_capabilities' AND ( AND umt.meta_value NOT LIKE '%Contributor%' AND umt.meta_value NOT LIKE '%Subscriber%' ) ) ) AND u.ID IN ( SELECT post_author FROM wp_posts as p WHERE p.post_status = 'publish' AND p.post_password = '' ) ORDER BY umt1.meta_value DESC

Cannot modify header information - headers already sent by (output started at /app/wp-includes/class-wpdb.php:1849) (500 Internal Server Error)

Symfony Exception

ErrorException

HTTP 500 Internal Server Error

Cannot modify header information - headers already sent by (output started at /app/wp-includes/class-wpdb.php:1849)

Exception

ErrorException

Show exception properties
ErrorException {#4063
  #severity: E_WARNING
}
  1.          * @param array $headers HTTP headers.
  2.          * @param bool  $is_xsl Whether these headers are for XSL.
  3.          */
  4.         $headers $this->do_filter'sitemap/http_headers'$headers$is_xsl );
  5.         header$this->get_protocol() . ' 200 OK'true200 );
  6.         foreach ( $headers as $header => $value ) {
  7.             header$header ': ' $value );
  8.         }
  9.     }
  1.      * @throws \ErrorException
  2.      */
  3.     public function handleError($level$message$file ''$line 0$context = [])
  4.     {
  5.         try {
  6.             parent::handleError($level$message$file$line$context);
  7.         } catch (Throwable $e) {
  8.             if (! apply_filters('acorn/throw_error_exception'true$e)) {
  9.                 return false;
  10.             }
HandleExceptions->handleError(2, 'Cannot modify header information - headers already sent by (output started at /app/wp-includes/class-wpdb.php:1849)', '/app/wp-content/plugins/seo-by-rank-math/includes/modules/sitemap/abstract-xml.php', 66)
  1.          * @param array $headers HTTP headers.
  2.          * @param bool  $is_xsl Whether these headers are for XSL.
  3.          */
  4.         $headers $this->do_filter'sitemap/http_headers'$headers$is_xsl );
  5.         header$this->get_protocol() . ' 200 OK'true200 );
  6.         foreach ( $headers as $header => $value ) {
  7.             header$header ': ' $value );
  8.         }
  9.     }
  1.             $wp_query->set_404();
  2.             status_header404 );
  3.             return;
  4.         }
  5.         $this->send_headers();
  6.         echo $this->sitemap// phpcs:ignore
  7.         $this->output_credits();
  8.         remove_all_actions'wp_footer' );
  9.         die;
  10.     }
  1.         $this->filter'user_has_cap''filter_user_has_cap' );
  2.         $this->type  $type;
  3.         $this->cache = new Cache();
  4.         $this->set_nget_query_var'sitemap_n' ) );
  5.         $this->output();
  6.     }
  7.     /**
  8.      * Generate sitemap now.
  9.      */
  1.         $type get_query_var'sitemap' );
  2.         if ( empty( $type ) ) {
  3.             return;
  4.         }
  5.         new Sitemap_XML$type );
  6.     }
  7.     /**
  8.      * Check the current request URI, if we can determine it's probably an XML sitemap, kill loading the widgets.
  9.      */
Router->request_sitemap(object(WP_Query)) in /app/wp-includes/class-wp-hook.php (line 324)
  1.                 // Avoid the array_slice() if possible.
  2.                 if ( === $the_['accepted_args'] ) {
  3.                     $value call_user_func$the_['function'] );
  4.                 } elseif ( $the_['accepted_args'] >= $num_args ) {
  5.                     $value call_user_func_array$the_['function'], $args );
  6.                 } else {
  7.                     $value call_user_func_array$the_['function'], array_slice$args0$the_['accepted_args'] ) );
  8.                 }
  9.             }
  10.         } while ( false !== next$this->iterations$nesting_level ] ) );
WP_Hook->apply_filters('', array(object(WP_Query))) in /app/wp-includes/class-wp-hook.php (line 348)
  1.      *
  2.      * @param array $args Parameters to pass to the callback functions.
  3.      */
  4.     public function do_action$args ) {
  5.         $this->doing_action true;
  6.         $this->apply_filters''$args );
  7.         // If there are recursive calls to the current action, we haven't finished it until we get to the last one.
  8.         if ( ! $this->nesting_level ) {
  9.             $this->doing_action false;
  10.         }
WP_Hook->do_action(array(object(WP_Query))) in /app/wp-includes/plugin.php (line 565)
  1.     if ( ! isset( $wp_filter['all'] ) ) {
  2.         $wp_current_filter[] = $hook_name;
  3.     }
  4.     $wp_filter$hook_name ]->do_action$args );
  5.     array_pop$wp_current_filter );
  6. }
  7. /**
do_action_ref_array('parse_query', array(object(WP_Query))) in /app/wp-includes/class-wp-query.php (line 1140)
  1.          *
  2.          * @since 1.5.0
  3.          *
  4.          * @param WP_Query $query The WP_Query instance (passed by reference).
  5.          */
  6.         do_action_ref_array'parse_query', array( &$this ) );
  7.     }
  8.     /**
  9.      * Parses various taxonomy related query vars.
  10.      *
WP_Query->parse_query() in /app/wp-includes/class-wp-query.php (line 1868)
  1.      * @return WP_Post[]|int[] Array of post objects or post IDs.
  2.      */
  3.     public function get_posts() {
  4.         global $wpdb;
  5.         $this->parse_query();
  6.         /**
  7.          * Fires after the query variable object is created, but before the actual query is run.
  8.          *
  9.          * Note: If using conditional tags, use the method versions within the passed instance
WP_Query->get_posts() in /app/wp-includes/class-wp-query.php (line 3852)
  1.      */
  2.     public function query$query ) {
  3.         $this->init();
  4.         $this->query      wp_parse_args$query );
  5.         $this->query_vars $this->query;
  6.         return $this->get_posts();
  7.     }
  8.     /**
  9.      * Retrieves the currently queried object.
  10.      *
WP_Query->query(array('sitemap' => '1')) in /app/wp-includes/class-wp.php (line 696)
  1.      * @global WP_Query $wp_the_query WordPress Query object.
  2.      */
  3.     public function query_posts() {
  4.         global $wp_the_query;
  5.         $this->build_query_string();
  6.         $wp_the_query->query$this->query_vars );
  7.     }
  8.     /**
  9.      * Set the Headers for 404, if nothing is found for requested URL.
  10.      *
WP->query_posts() in /app/wp-includes/class-wp.php (line 816)
  1.         $this->init();
  2.         $parsed $this->parse_request$query_args );
  3.         if ( $parsed ) {
  4.             $this->query_posts();
  5.             $this->handle_404();
  6.             $this->register_globals();
  7.         }
  8.         $this->send_headers();
WP->main('') in /app/wp-includes/functions.php (line 1336)
  1.  * @param string|array $query_vars Default WP_Query arguments.
  2.  */
  3. function wp$query_vars '' ) {
  4.     global $wp$wp_query$wp_the_query;
  5.     $wp->main$query_vars );
  6.     if ( ! isset( $wp_the_query ) ) {
  7.         $wp_the_query $wp_query;
  8.     }
  9. }
wp() in /app/wp-blog-header.php (line 16)
  1.     // Load the WordPress library.
  2.     require_once __DIR__ '/wp-load.php';
  3.     // Set up the WordPress query.
  4.     wp();
  5.     // Load the theme template.
  6.     require_once ABSPATH WPINC '/template-loader.php';
  7. }
require('/app/wp-blog-header.php') in /app/index.php (line 17)
  1.  * @var bool
  2.  */
  3. define'WP_USE_THEMES'true );
  4. /** Loads the WordPress Environment and Template */
  5. require __DIR__ '/wp-blog-header.php';

Stack Trace

ErrorException
ErrorException:
Cannot modify header information - headers already sent by (output started at /app/wp-includes/class-wpdb.php:1849)

  at /app/wp-content/plugins/seo-by-rank-math/includes/modules/sitemap/abstract-xml.php:66
  at Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'Cannot modify header information - headers already sent by (output started at /app/wp-includes/class-wpdb.php:1849)', '/app/wp-content/plugins/seo-by-rank-math/includes/modules/sitemap/abstract-xml.php', 66, array())
     (/app/wp-content/themes/sage/vendor/roots/acorn/src/Roots/Acorn/Bootstrap/HandleExceptions.php:49)
  at Roots\Acorn\Bootstrap\HandleExceptions->handleError(2, 'Cannot modify header information - headers already sent by (output started at /app/wp-includes/class-wpdb.php:1849)', '/app/wp-content/plugins/seo-by-rank-math/includes/modules/sitemap/abstract-xml.php', 66)
  at header('HTTP/1.1 200 OK', true, 200)
     (/app/wp-content/plugins/seo-by-rank-math/includes/modules/sitemap/abstract-xml.php:66)
  at RankMath\Sitemap\XML->send_headers()
     (/app/wp-content/plugins/seo-by-rank-math/includes/modules/sitemap/class-sitemap-xml.php:102)
  at RankMath\Sitemap\Sitemap_XML->output()
     (/app/wp-content/plugins/seo-by-rank-math/includes/modules/sitemap/class-sitemap-xml.php:82)
  at RankMath\Sitemap\Sitemap_XML->__construct('1')
     (/app/wp-content/plugins/seo-by-rank-math/includes/modules/sitemap/class-router.php:79)
  at RankMath\Sitemap\Router->request_sitemap(object(WP_Query))
     (/app/wp-includes/class-wp-hook.php:324)
  at WP_Hook->apply_filters('', array(object(WP_Query)))
     (/app/wp-includes/class-wp-hook.php:348)
  at WP_Hook->do_action(array(object(WP_Query)))
     (/app/wp-includes/plugin.php:565)
  at do_action_ref_array('parse_query', array(object(WP_Query)))
     (/app/wp-includes/class-wp-query.php:1140)
  at WP_Query->parse_query()
     (/app/wp-includes/class-wp-query.php:1868)
  at WP_Query->get_posts()
     (/app/wp-includes/class-wp-query.php:3852)
  at WP_Query->query(array('sitemap' => '1'))
     (/app/wp-includes/class-wp.php:696)
  at WP->query_posts()
     (/app/wp-includes/class-wp.php:816)
  at WP->main('')
     (/app/wp-includes/functions.php:1336)
  at wp()
     (/app/wp-blog-header.php:16)
  at require('/app/wp-blog-header.php')
     (/app/index.php:17)