PHP Fatal Error: str_replace(): Argument $subject must be of type array|string

[ad_1]

Hello,

For a while, Query Monitor causes this PHP Fatal Error frequently.

See #6, when I create a transient (set_transient(1137802883, Array, 86400)):

Uncaught TypeError: str_replace(): Argument #3 ($subject) must be of type array|string, int given in /var/www/html/web/app/plugins/query-monitor/collectors/transients.php:84
Stack trace: 0 /var/www/html/web/app/plugins/query-monitor/collectors/transients.php(84): str_replace(Array, '', 1137802883) 1 /var/www/html/web/app/plugins/query-monitor/collectors/transients.php(59): QM_Collector_Transients->setted_transient(1137802883, 'blog', Array, 86400) 2 /var/www/html/web/wp/wp-includes/class-wp-hook.php(308): QM_Collector_Transients->action_setted_blog_transient(1137802883, Array, 86400) 3 /var/www/html/web/wp/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array) 4 /var/www/html/web/wp/wp-includes/plugin.php(517): WP_Hook->do_action(Array) 5 /var/www/html/web/wp/wp-includes/option.php(1022): do_action('setted_transien…', 1137802883, Array, 86400) 6 /var/www/html/web/app/mu-plugins/xxx/inc/posts.php(38): set_transient(1137802883, Array, 86400) 7 /var/www/html/web/app/themes/xxx/app/Widgets/TrendPosts_Widget.php(23): xxx\get_popular_posts(3, 'all') 8 /var/www/html/web/wp/wp-includes/class-wp-widget.php(394): App\Widgets\TrendPosts_Widget->widget(Array, Array) 9 /var/www/html/web/wp/wp-includes/widgets.php(835): WP_Widget->display_callback(Array, Array) 10 /var/www/html/web/app/uploads/cache/817c956f5a037b5a5e32619d67d47e8193e46b45.php(5): dynamic_sidebar('sidebar-footer-…') 11 /var/www/html/web/app/themes/xxx/vendor/illuminate/filesystem/Filesystem.php(107): require('/var/www/html/w…') 12 /var/www/html/web/app/themes/xxx/vendor/illuminate/filesystem/Filesystem.php(108): Illuminate\Filesystem\Filesystem::Illuminate\Filesystem{closure}() 13 /var/www/html/web/app/themes/xxx/vendor/illuminate/view/Engines/PhpEngine.php(58): Illuminate\Filesystem\Filesystem->getRequire('/var/www/html/w…', Array) 14 /var/www/html/web/app/themes/xxx/vendor/illuminate/view/Engines/CompilerEngine.php(61): Illuminate\View\Engines\PhpEngine->evaluatePath('/var/www/html/w…', Array) 15 /var/www/html/web/app/themes/xxx/vendor/illuminate/view/View.php(139): Illuminate\View\Engines\CompilerEngine->get('/var/www/html/w…', Array) 16 /var/www/html/web/app/themes/xxx/vendor/illuminate/view/View.php(122): Illuminate\View\View->getContents() 17 /var/www/html/web/app/themes/xxx/vendor/illuminate/view/View.php(91): Illuminate\View\View->renderContents() 18 /var/www/html/web/app/uploads/cache/5294ea3e0d35eff7d75c4f4fae37ae1b37477cea.php(9): Illuminate\View\View->render() 19 /var/www/html/web/app/themes/xxx/vendor/illuminate/filesystem/Filesystem.php(107): require('/var/www/html/w…') 20 /var/www/html/web/app/themes/xxx/vendor/illuminate/filesystem/Filesystem.php(108): Illuminate\Filesystem\Filesystem::Illuminate\Filesystem{closure}() 21 /var/www/html/web/app/themes/xxx/vendor/illuminate/view/Engines/PhpEngine.php(58): Illuminate\Filesystem\Filesystem->getRequire('/var/www/html/w…', Array) 22 /var/www/html/web/app/themes/xxx/vendor/illuminate/view/Engines/CompilerEngine.php(61): Illuminate\View\Engines\PhpEngine->evaluatePath('/var/www/html/w…', Array) 23 /var/www/html/web/app/themes/xxx/vendor/illuminate/view/View.php(139): Illuminate\View\Engines\CompilerEngine->get('/var/www/html/w…', Array) 24 /var/www/html/web/app/themes/xxx/vendor/illuminate/view/View.php(122): Illuminate\View\View->getContents() 25 /var/www/html/web/app/themes/xxx/vendor/illuminate/view/View.php(91): Illuminate\View\View->renderContents() 26 /var/www/html/web/app/uploads/cache/3be5464c943bb47b8b02ac5a8c0bc6419634670e.php(30): Illuminate\View\View->render() 27 /var/www/html/web/app/themes/xxx/vendor/illuminate/filesystem/Filesystem.php(107): require('/var/www/html/w…') 28 /var/www/html/web/app/themes/xxx/vendor/illuminate/filesystem/Filesystem.php(108): Illuminate\Filesystem\Filesystem::Illuminate\Filesystem{closure}() 29 /var/www/html/web/app/themes/xxx/vendor/illuminate/view/Engines/PhpEngine.php(58): Illuminate\Filesystem\Filesystem->getRequire('/var/www/html/w…', Array) 30 /var/www/html/web/app/themes/xxx/vendor/illuminate/view/Engines/CompilerEngine.php(61): Illuminate\View\Engines\PhpEngine->evaluatePath('/var/www/html/w…', Array) 31 /var/www/html/web/app/themes/xxx/vendor/illuminate/view/View.php(139): Illuminate\View\Engines\CompilerEngine->get('/var/www/html/w…', Array) 32 /var/www/html/web/app/themes/xxx/vendor/illuminate/view/View.php(122): Illuminate\View\View->getContents() 33 /var/www/html/web/app/themes/xxx/vendor/illuminate/view/View.php(91): Illuminate\View\View->renderContents() 34 /var/www/html/web/app/uploads/cache/40af408fc0520b2f7065eea20f9b5bd5747307ca.php(35): Illuminate\View\View->render() 35 /var/www/html/web/app/themes/xxx/vendor/illuminate/filesystem/Filesystem.php(107): require('/var/www/html/w…') 36 /var/www/html/web/app/themes/xxx/vendor/illuminate/filesystem/Filesystem.php(108): Illuminate\Filesystem\Filesystem::Illuminate\Filesystem{closure}() 37 /var/www/html/web/app/themes/xxx/vendor/illuminate/view/Engines/PhpEngine.php(58): Illuminate\Filesystem\Filesystem->getRequire('/var/www/html/w…', Array) 38 /var/www/html/web/app/themes/xxx/vendor/illuminate/view/Engines/CompilerEngine.php(61): Illuminate\View\Engines\PhpEngine->evaluatePath('/var/www/html/w…', Array) 39 /var/www/html/web/app/themes/xxx/vendor/illuminate/view/View.php(139): Illuminate\View\Engines\CompilerEngine->get('/var/www/html/w…', Array) 40 /var/www/html/web/app/themes/xxx/vendor/illuminate/view/View.php(122): Illuminate\View\View->getContents() 41 /var/www/html/web/app/themes/xxx/vendor/illuminate/view/View.php(91): Illuminate\View\View->renderContents() 42 /var/www/html/web/app/uploads/cache/409ad8968ec4d7d30dd3fd227d3b1e16527b9477.php(2): Illuminate\View\View->render() 43 /var/www/html/web/app/themes/xxx/vendor/illuminate/filesystem/Filesystem.php(107): require('/var/www/html/w…') 44 /var/www/html/web/app/themes/xxx/vendor/illuminate/filesystem/Filesystem.php(108): Illuminate\Filesystem\Filesystem::Illuminate\Filesystem{closure}() 45 /var/www/html/web/app/themes/xxx/vendor/illuminate/view/Engines/PhpEngine.php(58): Illuminate\Filesystem\Filesystem->getRequire('/var/www/html/w…', Array) 46 /var/www/html/web/app/themes/xxx/vendor/illuminate/view/Engines/CompilerEngine.php(61): Illuminate\View\Engines\PhpEngine->evaluatePath('/var/www/html/w…', Array) 47 /var/www/html/web/app/themes/xxx/vendor/illuminate/view/View.php(139): Illuminate\View\Engines\CompilerEngine->get('/var/www/html/w…', Array) 48 /var/www/html/web/app/themes/xxx/vendor/illuminate/view/View.php(122): Illuminate\View\View->getContents() 49 /var/www/html/web/app/themes/xxx/vendor/illuminate/view/View.php(91): Illuminate\View\View->renderContents() 50 /var/www/html/web/app/themes/xxx/vendor/dreamon11/sage-lib/Template/Blade.php(58): Illuminate\View\View->render() 51 /var/www/html/web/app/themes/xxx/app/helpers.php(58): Roots\Sage\Template\Blade->render('/var/www/html/w…', Array) 52 /var/www/html/web/app/themes/xxx/app/filters.php(84): App\template('/var/www/html/w…', Array) 53 /var/www/html/web/wp/wp-includes/class-wp-hook.php(308): App{closure}('/var/www/html/w…') 54 /var/www/html/web/wp/wp-includes/plugin.php(205): WP_Hook->apply_filters('/var/www/html/w…', Array) 55 /var/www/html/web/wp/wp-includes/template-loader.php(104): apply_filters('template_includ…', '/var/www/html/w…') 56 /var/www/html/web/wp/wp-blog-header.php(19): require_once('/var/www/html/w…') 57 /var/www/html/web/index.php(6): require('/var/www/html/w…') 58 {main}

Can you help?

Thanks!

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer