Looklike happened by a plugin or php, do you tested plugins? Mean disable one by one then check error is fixed or no?
https://github.com/WordPress/WordPress/blob/5.3-branch/wp-includes/class-wp-post-type.php#L526
Foreach only works with arrays and objects.
may be a conflict of themes or pligin, set the default theme twenty * and disable your plugins, if this does not solve the problem you can check your php error log.
So then, my advanced degree from the University of Help Menu, ME, isn’t getting me where I need to be to solve the, I am certain simple, placement of an empty array somewhere below. Would anyone be so kind as to provide a hint? I don’t wanna break everything and the access to my site as I swap hosts, and upgraded tha dang PHP. THANKS!!
Invalid argument supplied for foreach() in …wp-includes/class-wp-post-type.php on line 526, referer: …wp-admin/options-general.php?highlight=confirm_admin_email…
*
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
* @global WP $wp_rewrite Current WordPress environment instance.
*/
public function add_rewrite_rules() {
global $wp_rewrite, $wp;
if ( false !== $this->query_var && $wp && is_post_type_viewable( $this ) ) {
$wp->add_query_var( $this->query_var );
}
if ( false !== $this->rewrite && ( is_admin() || ” != get_option( ‘permalink_structure’ ) ) ) {
if ( $this->hierarchical ) {
add_rewrite_tag( “%$this->name%”, ‘(.+?)’, $this->query_var ? “{$this->query_var}=” : “post_type=$this->name&pagename=” );
} else {
add_rewrite_tag( “%$this->name%”, ‘([^/]+)’, $this->query_var ? “{$this->query_var}=” : “post_type=$this->name&name=” );
}
printf(
/* translators: %s: New admin email. */
__( ‘There is a pending change of the admin email to %s.’ ),
‘' . esc_html( $new_admin_email ) . '‘
);
printf(
‘ ‘,
esc_url( wp_nonce_url( admin_url( ‘options.php?dismiss=new_admin_email’ ), ‘dismiss-‘ . get_current_blog_id() . ‘-new_admin_email’ ) ),
__( ‘Cancel’ )
);