Some bugs like this:
( ! ) Fatal error: Declaration of CMB2_Type_File_List::render() must be compatible with CMB2_Type_Text::render($args = Array) in webdevstudios/cmb2/includes/types/CMB2_Type_File_List.php on line 13
Hello
Ive tried a quick test too on new php 7.2 to update a personal project. A lot of Types works well but text_datetime_timestamp is problematic (doesnt work at all with php 7.2, until 7.1 branch) .
So just to help with this.
CMB2_Type_File_List extends CMB2_Type_File_Base
CMB2_Type_File_Base extends CMB2_Type_Text
CMB2_Type_Text has a render() method with a signature of public function render( $args = array() ) {
CMB2_Type_File_Base does not implement its own render method, but CMB2_Type_File_List does but it does not pass a default $args of empty array.
Changing that should clear up the original error reported. Apparently it's also going to cause fatal errors, so we should get this taken care of soon, as PHP7.2 is officially released and will begin getting updated to with more frequency.
Any update on this, pretty the only blocker to rolling 7.2 on our sites as cmb2 is pretty much used on every wp site. Happy to buy someone a beer to pull in a pull request if that is not already underway.
Just a heads up, 2.3.0 has been released and contains the php 7.2 compatibility fix.
Hi, I got the same issue now.
Please help me as soon as possible.
@salientroot can you confirm if you're already using CMB2 version 2.3.0 or are your errors coming up with that version already updated to?
sorry, I am using the wp real estate plugin now and got the issue
Sounds like they've bundled CMB2 in with their plugin, and will need to get that updated as part of an overall update for their plugin.
yeah, i think so, but the plugin is just the latest version.
Yes, you may have the latest version of WP Real Estate, but that version doesn't have the latest version of CMB2 with the PHP 7.2 compatibility fixes. Their devs need to update the copy of CMB2 that ships with their plugin and release an update that includes that.
Do you have a link to where one can download a copy of WP Real Estate? or is it a premium plugin?
Unless the wp real estate plugin bundled CMB2 incorrectly, you should be able to install the CMB2 plugin separately to override their bundled version and fix the issue.
hmm, I think it's not good way
ok, anyway this is not your problem. thanks for your help :)
Does downgrade of php fix it?
technically, but ideally whatever is bundling CMB2 should get upgraded to 2.3.x to address the compatibility issues. As more and more trickle up to PHP7.2, it's going to become more apparent that the bundlers need to act.
Added a section to the troubleshooting wiki: https://github.com/CMB2/CMB2/wiki/Troubleshooting#fatal-error-declaration-of-cmb2_type_colorpickerrender-or-similar
Most helpful comment
Just a heads up, 2.3.0 has been released and contains the php 7.2 compatibility fix.