我刚刚将我的PHP应用程序(Wordpress上方的WooCommerce)移动到使用PHP 5.6.4的服务器上,我收到以下警告:
Warning: curl_setopt() expects parameter 2 to be long, string given in /srv/users/serverpilot/apps/wordpress/public/wp-content/plugins/woocommerce-amazon-s3-storage/amazon_sdk/lib/requestcore/requestcore.class.php on line 610
据我所知,当我尝试引用这个在 PHP 5.6 上不再定义的内置 var CURLCLOSEPOLICY_LEAST_RECENTLY_USED
时,就会发生这种情况
是用CURLCLOSEPOLICY_OLDEST
替换更好还是注释掉curl_setopt($handle, CURLOPT_CLOSEPOLICY, CURLCLOSEPOLICY_LEAST_RECENTLY_USED)
集更好?
CURLOPT_CLOSEPOLICY CURLCLOSEPOLICY_* 值之一。注意:这 选项已弃用,因为它从未在 cURL 中实现,也从未 有任何效果。
http://php.net/manual/en/function.curl-setopt.php
只需删除此行