HyperDB icon indicating copy to clipboard operation
HyperDB copied to clipboard

PHP 8.1.9 Fatal error on saving changes in Discussion/Media settings

Open katladyj opened this issue 3 years ago • 1 comments

I am testing HyperDB with a fresh install of WordPress 6.0.2 on Apache+php 8.1.9. Clicking "Save Changes" on the Discussion/Media Settings pages in the dashboard returns the critical error notice page. This occurs even if no options were selected to be changed. The other settings pages don't return this error.

Log for Discussion Settings:

AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught mysqli_sql_exception: Column 'option_value' cannot be null in /www/wp-content/db.php:1404
Stack trace:
#0 /www/wp-content/db.php(1404): mysqli_query()
#1 /www/wp-content/db.php(942): hyperdb->ex_mysql_query()
#2 /www/wp-includes/wp-db.php(2476): hyperdb->query()
#3 /www/wp-includes/option.php(496): wpdb->update()
#4 /www/wp-admin/options.php(322): update_option()
#5 {main}
  thrown in /www/wp-content/db.php on line 1404', referer: https://host.url/wp-admin/options-discussion.php

Log for Media Settings:

AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught mysqli_sql_exception: Column 'option_value' cannot be null in /www/wp-content/db.php:1404
Stack trace:
#0 /www/wp-content/db.php(1404): mysqli_query()
#1 /www/wp-content/db.php(942): hyperdb->ex_mysql_query()
#2 /www/wp-includes/wp-db.php(2476): hyperdb->query()
#3 /www/wp-includes/option.php(496): wpdb->update()
#4 /www/wp-admin/options.php(322): update_option()
#5 {main}
  thrown in /www/wp-content/db.php on line 1404', referer: https://host.url/wp-admin/options-media.php

katladyj avatar Aug 31 '22 14:08 katladyj

I believe this was fixed via #41 + #42, but the version of HyperDB you likely installed from the plugin directory didn't have those fixes yet.

dd32 avatar Oct 06 '22 06:10 dd32