Wednesday, January 11, 2023
HomeWordPress Developmentpermalinks - 'Unsupported Operand Varieties' error stemming from taxonomy re-writes with PHP...

permalinks – ‘Unsupported Operand Varieties’ error stemming from taxonomy re-writes with PHP 8.1


I used to be getting a FATAL ERROR in WordPress, however solely on the entrance finish. I KNOW the error is inside my plugin, however the stack hint returns data about WP Core information, and would not establish the place in my plugin the error is. (And the plugin is very large and complicated, so means of elimination would take hours and hours.)

Deadly error: Uncaught TypeError: Unsupported operand varieties: string & int in /wordpress/wp-includes/class-wp-rewrite.php:1036 Stack hint: #0 /wordpress/wp-includes/class-wp-rewrite.php(1405): WP_Rewrite->generate_rewrite_rules('/applications/%basl...', 'EP_PERMALINK', true, true, false, true, true)

The important thing portion of this error is that this:

'/applications/%basl...', EP_PERMALINK

Now, the one place the place I might consider the place my applications (a taxonomy) has any kind of re-write, is within the precise register_taxonomy() perform.

Does something on this code look as if it’s going to trigger a difficulty with PHP 8.1?

$taxonomy_rewrites   = array(
    'slug'                      => 'applications',
    'with_front'                => true,
    'hierarchical'              => false,
    'ep_mask'                   => 'EP_PERMALINK'
);

Does anybody know of something totally different that we must be doing when creating taxonomies for WP/PHP 8.1?

(The very same web site is working in a manufacturing atmosphere utilizing PHP 7.4 and the difficulty has not introduced itself. It is simply appeared within the growth atmosphere which I maintain at PHP 8.1 particularly to try to catch points like this.)

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments