Skip to content

Commit 06f2ef3

Browse files
committed
Register Fieldtypes on init
The __() or _e() calls in the static register methods may not be called earlier. Fixes: https://wordpress.org/support/topic/warnings-in-php-8-4-wordpress-6-8-3/
1 parent 32ca852 commit 06f2ef3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cforms.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
}
6666

6767
register_activation_hook(__FILE__, 'cforms2_setup_db');
68-
Fieldtypes\Fieldtype::register();
68+
add_action('init', Fieldtypes\Fieldtype::register);
6969

7070
// settings corrupted?
7171
if (!is_array(get_option('cforms_settings'))) {

0 commit comments

Comments
 (0)