NO BUG: Error when editing functions.php within WordPress theme file editor

Browser: Edge 130.0.2849.46
OS: Windows
URL: from admin, /wp-admin/theme-editor.php?file=functions.php&theme=bricks-child
Video: Synology Drive

When trying to add/edit the functions.php file in the Bricks child theme from the WordPress admin editor (convenient sometimes), I get the following error, even when not making any change to the file:

Your PHP code changes were not applied due to an error on line 1039 of file wp-content/themes/bricks/includes/query.php. Please fix and try saving again.

Uncaught TypeError: Unsupported operand types: string + int in wp-content/themes/bricks/includes/query.php:1039
Stack trace:
#0 wp-includes/class-wp-hook.php(324): Bricks\Query->set_pagination_with_offset()
#1 wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#2 wp-includes/plugin.php(565): WP_Hook->do_action()
#3 wp-includes/class-wp-query.php(1881): do_action_ref_array()
#4 wp-includes/class-wp-query.php(3852): WP_Query->get_posts()
#5 wp-includes/class-wp-query.php(3984): WP_Query->query()
#6 wp-content/themes/bricks/includes/query.php(819): WP_Query->__construct()
#7 wp-content/themes/bricks/includes/query.php(647): Bricks\Query->run_wp_query()
#8 wp-content/themes/bricks/includes/query.php(82): Bricks\Query->run()
#9 wp-content/themes/bricks/includes/assets.php(2941): Bricks\Query->__construct()
#10 wp-content/themes/bricks/includes/assets.php(2904): Bricks\Assets::generate_css_from_element()
#11 wp-content/themes/bricks/includes/templates.php(277): Bricks\Assets::generate_css_from_elements()
#12 wp-content/themes/bricks/includes/templates.php(199): Bricks\Templates::generate_inline_css()
#13 wp-includes/shortcodes.php(434): Bricks\Templates->render_shortcode()
#14 [internal function]: do_shortcode_tag()
#15 wp-includes/shortcodes.php(273): preg_replace_callback()
#16 wp-content/themes/bricks/includes/helpers.php(2078): do_shortcode()
#17 wp-content/themes/bricks/includes/elements/text.php(90): Bricks\Helpers::parse_editor_content()
#18 wp-content/themes/bricks/includes/elements/base.php(2419): Bricks\Element_Text->render()
#19 wp-content/themes/bricks/includes/frontend.php(590): Bricks\Element->init()
#20 wp-content/themes/bricks/includes/elements/container.php(964): Bricks\Frontend::render_element()
#21 wp-content/themes/bricks/includes/elements/base.php(2419): Bricks\Element_Container->render()
#22 wp-content/themes/bricks/includes/frontend.php(590): Bricks\Element->init()
#23 wp-content/themes/bricks/includes/elements/container.php(964): Bricks\Frontend::render_element()
#24 wp-content/themes/bricks/includes/elements/base.php(2419): Bricks\Element_Container->render()
#25 wp-content/themes/bricks/includes/frontend.php(590): Bricks\Element->init()
#26 wp-content/themes/bricks/includes/elements/container.php(964): Bricks\Frontend::render_element()
#27 wp-content/themes/bricks/includes/elements/base.php(2419): Bricks\Element_Container->render()
#28 wp-content/themes/bricks/includes/frontend.php(590): Bricks\Element->init()
#29 wp-content/themes/bricks/includes/frontend.php(704): Bricks\Frontend::render_element()
#30 wp-content/themes/bricks/includes/frontend.php(954): Bricks\Frontend::render_data()
#31 wp-content/themes/bricks/page.php(7): Bricks\Frontend::render_content()
#32 wp-includes/template-loader.php(106): include('/home/jonatha8/...')
#33 wp-blog-header.php(19): require_once('/home/jonatha8/...')
#34 index.php(17): require('/home/jonatha8/...')
#35 {main}
  thrown

Hello and welcome to the forum!

I can’t reproduce this issue locally. Can you try to disable plugins and custom scripts and try again?

Matej

Sorry Matej, this was user error. Please feel free to delete or remove.