Title: Problem with PHP PHP8.1.10
Last modified: October 4, 2022

---

# Problem with PHP PHP8.1.10

 *  Resolved [beun](https://wordpress.org/support/users/beun/)
 * (@beun)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/problem-with-php-php8-1-10/)
 * I have to swith to php8.1 because my provider does this.
    Only when i switch 
   to PHP8.1.10 i cant load my website.
 * I already removed all plugins and upgraded to wordpress version 6.0.2 (on my 
   home server)
    But nothing helped, seems to me that the error is coming out of
   the theme (other themes does work) problem seems to come from the file social-
   media-widget.php
 * Can someone help me to solve this problem ?
 * below is the error message
 * Fatal error: Uncaught ArgumentCountError: Too few arguments to function WP_Widget::
   __construct(), 0 passed in /var/www/html/wordpress/wp-includes/class-wp-widget-
   factory.php on line 61 and at least 2 expected in /var/www/html/wordpress/wp-
   includes/class-wp-widget.php:162 Stack trace:
    #0 /var/www/html/wordpress/wp-
   includes/class-wp-widget-factory.php(61): WP_Widget->__construct() #1 /var/www/
   html/wordpress/wp-includes/widgets.php(115): WP_Widget_Factory->register() #2/
   var/www/html/wordpress/wp-content/themes/sg-window/inc/social-media-widget.php(
   154): register_widget() #3 /var/www/html/wordpress/wp-includes/class-wp-hook.
   php(307): sgwindow_register_social_widgets() #4 /var/www/html/wordpress/wp-includes/
   class-wp-hook.php(331): WP_Hook->apply_filters() #5 /var/www/html/wordpress/wp-
   includes/plugin.php(476): WP_Hook->do_action() #6 /var/www/html/wordpress/wp-
   includes/widgets.php(1854): do_action() #7 /var/www/html/wordpress/wp-includes/
   class-wp-hook.php(307): wp_widgets_init() #8 /var/www/html/wordpress/wp-includes/
   class-wp-hook.php(331): WP_Hook->apply_filters() #9 /var/www/html/wordpress/wp-
   includes/plugin.php(476): WP_Hook->do_action() #10 /var/www/html/wordpress/wp-
   settings.php(598): do_action() #11 /var/www/html/wordpress/wp-config.php(96):
   require_once(‘…’) #12 /var/www/html/wordpress/wp-load.php(50): require_once(‘…’)#
   13 /var/www/html/wordpress/wp-blog-header.php(13): require_once(‘…’) #14 /var/
   www/html/wordpress/index.php(17): require(‘…’) #15 {main} thrown in /var/www/
   html/wordpress/wp-includes/class-wp-widget.php on line 162 There has been a critical
   error on this website.`

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

 *  [cyobi](https://wordpress.org/support/users/imait/)
 * (@imait)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/problem-with-php-php8-1-10/#post-16154410)
 * 私も同じ問題が発生しています。ご解決されているようでしたらご教授いただけると幸い
   です
 *  Thread Starter [beun](https://wordpress.org/support/users/beun/)
 * (@beun)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/problem-with-php-php8-1-10/#post-16155210)
 * Hi,
 * I could not solve the problem.
    I did create a new web site 🙁
 *  [cyobi](https://wordpress.org/support/users/imait/)
 * (@imait)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/problem-with-php-php8-1-10/#post-16163231)
 * thank you for your reply.

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

The topic ‘Problem with PHP PHP8.1.10’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/sg-window/1.2.3/screenshot.png)
 * SG Window
 * [Support Threads](https://wordpress.org/support/theme/sg-window/)
 * [Active Topics](https://wordpress.org/support/theme/sg-window/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/sg-window/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/sg-window/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [cyobi](https://wordpress.org/support/users/imait/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/problem-with-php-php8-1-10/#post-16163231)
 * Status: resolved