Title: strlen() error
Last modified: March 12, 2024

---

# strlen() error

 *  Resolved [Andy Fragen](https://wordpress.org/support/users/afragen/)
 * (@afragen)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/strlen-error/)
 * When running WP 6.5-RC1 I’m getting the following error on sites running the 
   Powder theme in the front end.
 *     ```wp-block-code
       Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /Users/afragen/Local_Sites/thefragens/app/public/wp-includes/html-api/class-wp-html-tag-processor.php on line 857
       Call Stack#TimeMemoryFunctionLocation
       10.0016366960{main}( ).../index.php:0
   
       20.0016367264require( '/Users/afragen/Local_Sites/thefragens/app/public/wp-blog-header.php ).../index.php:17
   
       30.22066125728require_once( '/Users/afragen/Local_Sites/thefragens/app/public/wp-includes/template-loader.php ).../wp-blog-header.php:19
   
       40.24346595560include( '/Users/afragen/Local_Sites/thefragens/app/public/wp-includes/template-canvas.php ).../template-loader.php:106
   
       50.24346595560get_the_block_template_html( ).../template-canvas.php:12
   
       60.24356596128do_blocks( $content = '<!-- wp:template-part {"slug":"header","theme":"powder","tagName":"header","className":"site-header"} /-->\n\n<!-- wp:group {"tagName":"main","style":{"spacing":{"margin":{"top":"0"},"padding":{"top":"40px","bottom":"40px"}}},"layout":{"type":"constrained"}} -->\n<main class="wp-block-group" style="margin-top:0;padding-top:40px;padding-bottom:40px"><!-- wp:query {"queryId":0,"query":{"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","type":"'... ).../block-template.php:263
   
       70.24386619880render_block( $parsed_block = ['blockName' => 'core/template-part', 'attrs' => ['slug' => 'header', 'theme' => 'powder', 'tagName' => 'header', 'className' => 'site-header'], 'innerBlocks' => [], 'innerHTML' => '', 'innerContent' => []] ).../blocks.php:1743
   
       80.24396629312WP_Block->render( $options = ??? ).../blocks.php:1705
   
       90.24396630008render_block_core_template_part( $attributes = ['slug' => 'header', 'theme' => 'powder', 'tagName' => 'header', 'className' => 'site-header'], '', class WP_Block { public $parsed_block = ['blockName' => 'core/template-part', 'attrs' => [...], 'innerBlocks' => [...], 'innerHTML' => '', 'innerContent' => [...]]; public $name = 'core/template-part'; public $block_type = class WP_Block_Type { public $api_version = 3; public $name = 'core/template-part'; public $title = 'Template Part'; public $category = 'theme'; public $parent = NULL; public $ancestor = NULL; public $allowed_blocks = NULL; public $icon = NULL; public $description = 'Edit the different global regions of your site, like the header, footer, sidebar, or create your own.'; public $keywords = [...]; public $textdomain = NULL; public $styles = [...]; private $variations = NULL; public $variation_callback = 'build_template_part_block_variations'; public $selectors = [...]; public $supports = [...]; public $example = NULL; public $render_callback = 'render_block_core_template_part'; public $attributes = [...]; private $uses_context = [...]; public $provides_context = NULL; public $block_hooks = [...]; public $editor_script_handles = [...]; public $script_handles = [...]; public $view_script_handles = [...]; public $view_script_module_ids = [...]; public $editor_style_handles = [...]; public $style_handles = [...]; public $view_style_handles = [...]; private $deprecated_properties = [...] }; public $context = []; protected $available_context = ['postId' => 2176, 'postType' => 'post']; protected $registry = class WP_Block_Type_Registry { private $registered_block_types = [...] }; public $inner_blocks = []; public $inner_html = ''; public $inner_content = []; public $attributes = ['slug' => 'header', 'theme' => 'powder', 'tagName' => 'header', 'className' => 'site-header'] } ).../class-wp-block.php:463
   
       100.24716661912do_blocks( $content = '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"30px","bottom":"30px"},"margin":{"top":"0px"}}},"layout":{"type":"constrained"}} -->\n<div class="wp-block-group alignfull" style="margin-top:0px;padding-top:30px;padding-bottom:30px"><!-- wp:group {"align":"wide","layout":{"type":"flex","justifyContent":"space-between"}} -->\n<div class="wp-block-group alignwide"><!-- wp:site-title {"fontSize":"max-36"} /-->\n\n<!-- wp:navigation {"ref":2233,"layout":{"type":"flex","orientation":"horizontal"},'... ).../template-part.php:150
   
       110.24726671216render_block( $parsed_block = ['blockName' => 'core/group', 'attrs' => ['align' => 'full', 'style' => [...], 'layout' => [...]], 'innerBlocks' => [0 => [...]], 'innerHTML' => '\n<div class="wp-block-group alignfull" style="margin-top:0px;padding-top:30px;padding-bottom:30px"></div>\n', 'innerContent' => [0 => '\n<div class="wp-block-group alignfull" style="margin-top:0px;padding-top:30px;padding-bottom:30px">', 1 => NULL, 2 => '</div>\n']] ).../blocks.php:1743
   
       120.24736673544WP_Block->render( $options = ??? ).../blocks.php:1705
   
       130.24746674488WP_Block->render( $options = ??? ).../class-wp-block.php:443
   
       140.24796689664WP_Block->render( $options = ??? ).../class-wp-block.php:443
   
       150.24796691056render_block_core_navigation( $attributes = ['ref' => 2233, 'layout' => ['type' => 'flex', 'orientation' => 'horizontal'], 'style' => ['spacing' => [...]], 'showSubmenuIcon' => TRUE, 'openSubmenusOnClick' => FALSE, 'overlayMenu' => 'mobile', 'icon' => 'handle', 'hasIcon' => TRUE, 'maxNestingLevel' => 5], $content = '', $block = class WP_Block { public $parsed_block = ['blockName' => 'core/navigation', 'attrs' => [...], 'innerBlocks' => [...], 'innerHTML' => '', 'innerContent' => [...]]; public $name = 'core/navigation'; public $block_type = class WP_Block_Type { public $api_version = 3; public $name = 'core/navigation'; public $title = 'Navigation'; public $category = 'theme'; public $parent = NULL; public $ancestor = NULL; public $allowed_blocks = [...]; public $icon = NULL; public $description = 'A collection of blocks that allow visitors to get around your site.'; public $keywords = [...]; public $textdomain = NULL; public $styles = [...]; private $variations = NULL; public $variation_callback = NULL; public $selectors = [...]; public $supports = [...]; public $example = NULL; public $render_callback = 'render_block_core_navigation'; public $attributes = [...]; private $uses_context = [...]; public $provides_context = [...]; public $block_hooks = [...]; public $editor_script_handles = [...]; public $script_handles = [...]; public $view_script_handles = [...]; public $view_script_module_ids = [...]; public $editor_style_handles = [...]; public $style_handles = [...]; public $view_style_handles = [...]; private $deprecated_properties = [...] }; public $context = []; protected $available_context = ['postId' => 2176, 'postType' => 'post']; protected $registry = class WP_Block_Type_Registry { private $registered_block_types = [...] }; public $inner_blocks = []; public $inner_html = ''; public $inner_content = []; public $attributes = ['ref' => 2233, 'layout' => [...], 'style' => [...], 'showSubmenuIcon' => TRUE, 'openSubmenusOnClick' => FALSE, 'overlayMenu' => 'mobile', 'icon' => 'handle', 'hasIcon' => TRUE, 'maxNestingLevel' => 5] } ).../class-wp-block.php:463
   
       160.24796691056WP_Navigation_Block_Renderer::render( $attributes = ['ref' => 2233, 'layout' => ['type' => 'flex', 'orientation' => 'horizontal'], 'style' => ['spacing' => [...]], 'showSubmenuIcon' => TRUE, 'openSubmenusOnClick' => FALSE, 'overlayMenu' => 'mobile', 'icon' => 'handle', 'hasIcon' => TRUE, 'maxNestingLevel' => 5], $content = '', $block = class WP_Block { public $parsed_block = ['blockName' => 'core/navigation', 'attrs' => [...], 'innerBlocks' => [...], 'innerHTML' => '', 'innerContent' => [...]]; public $name = 'core/navigation'; public $block_type = class WP_Block_Type { public $api_version = 3; public $name = 'core/navigation'; public $title = 'Navigation'; public $category = 'theme'; public $parent = NULL; public $ancestor = NULL; public $allowed_blocks = [...]; public $icon = NULL; public $description = 'A collection of blocks that allow visitors to get around your site.'; public $keywords = [...]; public $textdomain = NULL; public $styles = [...]; private $variations = NULL; public $variation_callback = NULL; public $selectors = [...]; public $supports = [...]; public $example = NULL; public $render_callback = 'render_block_core_navigation'; public $attributes = [...]; private $uses_context = [...]; public $provides_context = [...]; public $block_hooks = [...]; public $editor_script_handles = [...]; public $script_handles = [...]; public $view_script_handles = [...]; public $view_script_module_ids = [...]; public $editor_style_handles = [...]; public $style_handles = [...]; public $view_style_handles = [...]; private $deprecated_properties = [...] }; public $context = []; protected $available_context = ['postId' => 2176, 'postType' => 'post']; protected $registry = class WP_Block_Type_Registry { private $registered_block_types = [...] }; public $inner_blocks = []; public $inner_html = ''; public $inner_content = []; public $attributes = ['ref' => 2233, 'layout' => [...], 'style' => [...], 'showSubmenuIcon' => TRUE, 'openSubmenusOnClick' => FALSE, 'overlayMenu' => 'mobile', 'icon' => 'handle', 'hasIcon' => TRUE, 'maxNestingLevel' => 5] } ).../navigation.php:1087
   
       170.25046800520WP_Navigation_Block_Renderer::get_wrapper_markup( $attributes = ['ref' => 2233, 'layout' => ['type' => 'flex', 'orientation' => 'horizontal'], 'style' => ['spacing' => [...]], 'showSubmenuIcon' => TRUE, 'openSubmenusOnClick' => FALSE, 'overlayMenu' => 'mobile', 'icon' => 'handle', 'hasIcon' => TRUE, 'maxNestingLevel' => 5], $inner_blocks = class WP_Block_List { protected $blocks = [0 => class WP_Block { ... }, 1 => class WP_Block { ... }, 2 => class WP_Block { ... }, 3 => class WP_Block { ... }, 4 => class WP_Block { ... }, 5 => class WP_Block { ... }]; protected $available_context = ['ref' => 2233, 'layout' => [...], 'style' => [...], 'showSubmenuIcon' => TRUE, 'openSubmenusOnClick' => FALSE, 'overlayMenu' => 'mobile', 'icon' => 'handle', 'hasIcon' => TRUE, 'maxNestingLevel' => 5]; protected $registry = class WP_Block_Type_Registry { private $registered_block_types = [...] } } ).../navigation.php:669
   
       180.25046800520WP_Navigation_Block_Renderer::get_inner_blocks_html( $attributes = ['ref' => 2233, 'layout' => ['type' => 'flex', 'orientation' => 'horizontal'], 'style' => ['spacing' => [...]], 'showSubmenuIcon' => TRUE, 'openSubmenusOnClick' => FALSE, 'overlayMenu' => 'mobile', 'icon' => 'handle', 'hasIcon' => TRUE, 'maxNestingLevel' => 5], $inner_blocks = class WP_Block_List { protected $blocks = [0 => class WP_Block { ... }, 1 => class WP_Block { ... }, 2 => class WP_Block { ... }, 3 => class WP_Block { ... }, 4 => class WP_Block { ... }, 5 => class WP_Block { ... }]; protected $available_context = ['ref' => 2233, 'layout' => [...], 'style' => [...], 'showSubmenuIcon' => TRUE, 'openSubmenusOnClick' => FALSE, 'overlayMenu' => 'mobile', 'icon' => 'handle', 'hasIcon' => TRUE, 'maxNestingLevel' => 5]; protected $registry = class WP_Block_Type_Registry { private $registered_block_types = [...] } } ).../navigation.php:606
   
       190.25276828192WP_HTML_Tag_Processor->next_tag( $query = 'LI' ).../navigation.php:169
   
       200.25276828192WP_HTML_Tag_Processor->next_token( ).../class-wp-html-tag-processor.php:796
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fstrlen-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Theme Author [Brian Gardner](https://wordpress.org/support/users/bgardner/)
 * (@bgardner)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/strlen-error/#post-17494393)
 * Is that with debug mode on?
 *  Thread Starter [Andy Fragen](https://wordpress.org/support/users/afragen/)
 * (@afragen)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/strlen-error/#post-17494535)
 * Yes, WP_DEBUG is true.
 * == Bug Report
   === Description
 * strlen() error passed null
 * === Environment
    - WordPress: 6.5-RC1
    - PHP: 8.1.27
    - Server: nginx/1.24.0
    - Database: mysqli (Server: 8.0.34 / Client: mysqlnd 8.1.27)
    - Browser: Safari 17.4 (Mobile) (iPhone)
    - Theme: Powder 1.0.2
    - MU-Plugins:
    - SpinupWP Debug Log Path 1.0
    - WP Migrate Compatibility 1.3
    - Plugins:
    - Add Custom Header Images 2.3.3
    - Auto-Flush Object Cache 0.7.0
    - Categorized 1.0
    - Embed PDF Viewer 2.3.1
    - Git Updater – Gist 2.0.3
    - Git Updater 12.4.0
    - Handbook Callout Blocks 1.0.0-beta5
    - Limit Login Attempts Reloaded 2.26.7
    - Login Logout Primary Menu Item 0.5.0
    - oEmbed Gists and Files 1.0.1
    - Optimize Database after Deleting Revisions 5.2.2
    - Query Monitor 3.15.0
    - Rename Image Meta to Title 0.3.0
    - Rollback Auto Update 7.2.0
    - Simple Mastodon Verification 1.1.3
    - Slug Control 0.1.0
    - SpinupWP 1.6
    - Stop Auto-update Success Email 0.2.0
    - SVG Social Menu 2.0.0
    - Syntax-highlighting Code Block (with Server-side Rendering) 1.4.0
    - What The Cron 0.1.2
    - WordPress Beta Tester 3.5.5
    - WP Author Slug 4
    - WP Crontrol 1.16.1
    - WP Debugging 2.11.23
    - WP Mail SMTP 4.0.1
    - WP Mail SMTP Settings 0.5.1
    - WP Migrate 2.6.12
    - WP Site Tweaks 1.0.11
 * === Steps to Reproduce
    1. 
       Navigate to frontend.
 * === Expected Results
    1. No error
 * === Actual Results
    1. ❌ above stacktrace
 *  Theme Author [Brian Gardner](https://wordpress.org/support/users/bgardner/)
 * (@bgardner)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/strlen-error/#post-17494541)
 * That is a decent list of plugins. Perhaps there’s an issue with one of them? 
   Only asking because I am running Powder and RC2 locally with debug on and do 
   not see the error. Any chance you can either disable plugins or test in a simpler
   environment to see if the issue still exists?
 *  Thread Starter [Andy Fragen](https://wordpress.org/support/users/afragen/)
 * (@afragen)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/strlen-error/#post-17494581)
 * Locally, I updated to 6.5-RC2 and deactivated most everything. The error remains.
 * === Environment
    - WordPress: 6.5-RC2
    - PHP: 8.2.10
    - Server: nginx/1.16.0
    - Database: mysqli (Server: 8.0.16 / Client: mysqlnd 8.2.10)
    - Browser: Safari 17.3.1
    - OS: macOS
    - Theme: Powder 1.0.2
    - MU Plugins: None activated
    - Plugins:
    - Test Reports 1.1.0
 *  Thread Starter [Andy Fragen](https://wordpress.org/support/users/afragen/)
 * (@afragen)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/strlen-error/#post-17494588)
 * When I downgrade to WP 6.4.3 there is no error.
 * === Environment
    - WordPress: 6.4.3
    - PHP: 8.2.10
    - Server: nginx/1.16.0
    - Database: mysqli (Server: 8.0.16 / Client: mysqlnd 8.2.10)
    - Browser: Safari 17.3.1
    - OS: macOS
    - Theme: Powder 1.0.2
    - MU Plugins: None activated
    - Plugins:
    - Core Rollback 1.3.5
    - Test Reports 1.1.0
 *  Thread Starter [Andy Fragen](https://wordpress.org/support/users/afragen/)
 * (@afragen)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/strlen-error/#post-17494716)
 * Strange. If I create a new local installation I don’t see the error.
 *  Theme Author [Brian Gardner](https://wordpress.org/support/users/bgardner/)
 * (@bgardner)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/strlen-error/#post-17494719)
 * Perhaps just a weird gremlin, isolated to that one install?
 *  Thread Starter [Andy Fragen](https://wordpress.org/support/users/afragen/)
 * (@afragen)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/strlen-error/#post-17494725)
 * Perhaps, though obviously that install has lots of data and same issue happens
   on server and locally. Gremlin would need to be present in both.
 * I’ll keep digging.
    -  This reply was modified 2 years, 2 months ago by [Andy Fragen](https://wordpress.org/support/users/afragen/).
 *  Thread Starter [Andy Fragen](https://wordpress.org/support/users/afragen/)
 * (@afragen)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/strlen-error/#post-17494893)
 * So it seems to be something inside my navigation block.
 * It seems that `WP_Navigation_Block_Renderer::get_inner_blocks_html()` can find
   an empty inner_block and passes that along resulting in the error.
 * A solution is to check the value returned from `$inner_block_markup = static::
   get_markup_for_inner_block( $inner_block )` and if it is empty simply continue
   in the containing foreach loop.
 * I’ll have to see where I that fix would go. Seems like a regression.
 *  Thread Starter [Andy Fragen](https://wordpress.org/support/users/afragen/)
 * (@afragen)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/strlen-error/#post-17494987)
 * [https://core.trac.wordpress.org/ticket/60762](https://core.trac.wordpress.org/ticket/60762)

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘strlen() error’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/powder/1.2.2/screenshot.png)
 * Powder
 * [Support Threads](https://wordpress.org/support/theme/powder/)
 * [Active Topics](https://wordpress.org/support/theme/powder/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/powder/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/powder/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [Andy Fragen](https://wordpress.org/support/users/afragen/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/strlen-error/#post-17494987)
 * Status: resolved