I have several long complex forms on a site that almost never has changes. Because the forms work, I have never wanted to spend the time to rebuild all of the forms. After updating to PHP 7.2, I am receiving the following warning:
"Deprecated: Function create_function() is deprecated in /home/metro103/public_html/components/com_chronoforms/libraries/chronoform.php on line 410"
Is there an easy fix for this that will keep me from having to rebuild all of the forms?
Jim
"Deprecated: Function create_function() is deprecated in /home/metro103/public_html/components/com_chronoforms/libraries/chronoform.php on line 410"
Is there an easy fix for this that will keep me from having to rebuild all of the forms?
Jim
So would the bold part of this line
Be changed to this
function _camilize($class = ''){
return preg_replace_callback('/(?:^|_)(.?)/i',create_function('$matches', 'return strtoupper($matches[1]);'), $class);
}
function('$matches'){return strtoupper ($matches[1];},Jim
function('$matches'){return strtoupper ($matches[1]);},
but yes, something like that.
Thank you Bob and all, i had the same error in my Joomla site:
"Deprecated: Function create_function() is deprecated in *****/components/com_chronoforms/libraries/chronoform.php on line 410".
In chronoform.php file and line 410 i replaced ONLY below code:
Tested on PHP 7.2 and 7.3, i still use Chronoforms 4.0.8 and latest joomla 3.9.20.
Thank you again!
"Deprecated: Function create_function() is deprecated in *****/components/com_chronoforms/libraries/chronoform.php on line 410".
In chronoform.php file and line 410 i replaced ONLY below code:
create_function('$matches', 'return strtoupper($matches[1]);')with this:
function($matches){return strtoupper($matches[1]);}and it worked, error message dissapeard!! The only difference is that function('$matches') needs to be function($matches) - without ' '.
Tested on PHP 7.2 and 7.3, i still use Chronoforms 4.0.8 and latest joomla 3.9.20.
Thank you again!
This topic is locked and no more replies can be posted.