In ExpressionEngine 2.10.1 we found some add-on screens in the control panel no longer worked, giving the error message "Fatal error: Call to undefined method Cp::set_variable()".
There’s a quick and easy fix for this. The error arises because the method of checking the EE version has changed, so you just need to update any lines where this happens.
User Rakesh posted the fix on Stack Exchange for Member Group Tabs and the same type of fix has worked for other add-ons we use.
How to fix “Call to undefined method Cp::set_variable()” error:
Go to the file & line number referenced in the error message
e.g. for Developer Info, go to developer_info/libraries/developer_info_helper.php line 52
Find a line with APP_VER in it near this
e.g. for Developer Info, it’s APP_VER >= ‘2.6.0’ on line 46
- Update the version check to use the version_compare function instead
e.g. for Developer Info, replace APP_VER >= ‘2.6.0’ with version_compare(APP_VER, ‘2.6.0’, ‘>=’)
Hopefully this quick fix should work for any affected add-ons.