admin管理员组文章数量:1130349
we are getting a error after updating a php version to 7.2
Deprecated: Function create_function() is deprecated in /customers/3/6/9/vakantiewoning-in-zuid-frankrijk.be/httpd.www/wp-content/themes/Tigerdesign/inc/init.php on line 22
Warning: session_start(): Cannot start session when headers already sent in /customers/3/6/9/vakantiewoning-in-zuid-frankrijk.be/httpd.www/wp-content/plugins/unyson/framework/includes/hooks.php on line 258
Notice: woocommerce_get_page_id is deprecated since version 3.0! Use wc_get_page_id instead. in /customers/3/6/9/vakantiewoning-in-zuid-frankrijk.be/httpd.www/wp-includes/functions.php on line 3888
Notice: WC_Cart::get_cart_url is deprecated since version 2.5! Use wc_get_cart_url instead. in /customers/3/6/9/vakantiewoning-in-zuid-frankrijk.be/httpd.www/wp-includes/functions.php on line 3888
we are getting a error after updating a php version to 7.2
Share Improve this question edited Dec 31, 2018 at 7:20 fuxia♦ 107k39 gold badges255 silver badges461 bronze badges asked Dec 31, 2018 at 7:01 Devloper FirstDevloper First 411 gold badge1 silver badge3 bronze badges 1Deprecated: Function create_function() is deprecated in /customers/3/6/9/vakantiewoning-in-zuid-frankrijk.be/httpd.www/wp-content/themes/Tigerdesign/inc/init.php on line 22
Warning: session_start(): Cannot start session when headers already sent in /customers/3/6/9/vakantiewoning-in-zuid-frankrijk.be/httpd.www/wp-content/plugins/unyson/framework/includes/hooks.php on line 258
Notice: woocommerce_get_page_id is deprecated since version 3.0! Use wc_get_page_id instead. in /customers/3/6/9/vakantiewoning-in-zuid-frankrijk.be/httpd.www/wp-includes/functions.php on line 3888
Notice: WC_Cart::get_cart_url is deprecated since version 2.5! Use wc_get_cart_url instead. in /customers/3/6/9/vakantiewoning-in-zuid-frankrijk.be/httpd.www/wp-includes/functions.php on line 3888
- Look at the file path in the first error. The problem is with your theme. You will need to contact the theme developer. Based on that error, and the last two errors, your theme is out of date and has not been updated for newer versions of WooCommerce and PHP. – Jacob Peattie Commented Dec 31, 2018 at 8:04
1 Answer
Reset to default 4Problem lies in your theme. It’s not compatible with PHP 7.2.
In this version the create_function is deprecated and you should use Anonymous Functions instead.
So for example instead of something like this:
$callback = create_function('', 'echo "'.str_replace('"', '\"', $section['desc']).'";');
You should use this:
$callback = function() {
echo str_replace('"', '\"', $section['desc']);
};
we are getting a error after updating a php version to 7.2
Deprecated: Function create_function() is deprecated in /customers/3/6/9/vakantiewoning-in-zuid-frankrijk.be/httpd.www/wp-content/themes/Tigerdesign/inc/init.php on line 22
Warning: session_start(): Cannot start session when headers already sent in /customers/3/6/9/vakantiewoning-in-zuid-frankrijk.be/httpd.www/wp-content/plugins/unyson/framework/includes/hooks.php on line 258
Notice: woocommerce_get_page_id is deprecated since version 3.0! Use wc_get_page_id instead. in /customers/3/6/9/vakantiewoning-in-zuid-frankrijk.be/httpd.www/wp-includes/functions.php on line 3888
Notice: WC_Cart::get_cart_url is deprecated since version 2.5! Use wc_get_cart_url instead. in /customers/3/6/9/vakantiewoning-in-zuid-frankrijk.be/httpd.www/wp-includes/functions.php on line 3888
we are getting a error after updating a php version to 7.2
Share Improve this question edited Dec 31, 2018 at 7:20 fuxia♦ 107k39 gold badges255 silver badges461 bronze badges asked Dec 31, 2018 at 7:01 Devloper FirstDevloper First 411 gold badge1 silver badge3 bronze badges 1Deprecated: Function create_function() is deprecated in /customers/3/6/9/vakantiewoning-in-zuid-frankrijk.be/httpd.www/wp-content/themes/Tigerdesign/inc/init.php on line 22
Warning: session_start(): Cannot start session when headers already sent in /customers/3/6/9/vakantiewoning-in-zuid-frankrijk.be/httpd.www/wp-content/plugins/unyson/framework/includes/hooks.php on line 258
Notice: woocommerce_get_page_id is deprecated since version 3.0! Use wc_get_page_id instead. in /customers/3/6/9/vakantiewoning-in-zuid-frankrijk.be/httpd.www/wp-includes/functions.php on line 3888
Notice: WC_Cart::get_cart_url is deprecated since version 2.5! Use wc_get_cart_url instead. in /customers/3/6/9/vakantiewoning-in-zuid-frankrijk.be/httpd.www/wp-includes/functions.php on line 3888
- Look at the file path in the first error. The problem is with your theme. You will need to contact the theme developer. Based on that error, and the last two errors, your theme is out of date and has not been updated for newer versions of WooCommerce and PHP. – Jacob Peattie Commented Dec 31, 2018 at 8:04
1 Answer
Reset to default 4Problem lies in your theme. It’s not compatible with PHP 7.2.
In this version the create_function is deprecated and you should use Anonymous Functions instead.
So for example instead of something like this:
$callback = create_function('', 'echo "'.str_replace('"', '\"', $section['desc']).'";');
You should use this:
$callback = function() {
echo str_replace('"', '\"', $section['desc']);
};
本文标签: Showing error quotFunction createfunction() is deprecatedquot
版权声明:本文标题:Showing error "Function create_function() is deprecated" 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749056682a2309455.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论