CURLCLOSEPOLICY_LEAST_RECENTLY_USED PHP 5.6.4 中不再定义:用其他东西替换或注释掉参考更好吗?
CURLCLOSEPOLICY_LEAST_RECENTLY_USED not defined anymore in PHP 5.6.4: is it better to replace with something else or to comment out the reference?
我刚刚将我的 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
据我所知,当我试图引用此内置变量 CURLCLOSEPOLICY_LEAST_RECENTLY_USED
时会发生这种情况,该变量在 PHP 5.6
上不再定义
用CURLCLOSEPOLICY_OLDEST
代替还是注释掉curl_setopt($handle, CURLOPT_CLOSEPOLICY, CURLCLOSEPOLICY_LEAST_RECENTLY_USED)
集更好?
CURLOPT_CLOSEPOLICY One of the CURLCLOSEPOLICY_* values. Note: This
option is deprecated, as it was never implemented in cURL and never
had any effect.
http://php.net/manual/en/function.curl-setopt.php
只需删除此行
我刚刚将我的 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
据我所知,当我试图引用此内置变量 CURLCLOSEPOLICY_LEAST_RECENTLY_USED
时会发生这种情况,该变量在 PHP 5.6
用CURLCLOSEPOLICY_OLDEST
代替还是注释掉curl_setopt($handle, CURLOPT_CLOSEPOLICY, CURLCLOSEPOLICY_LEAST_RECENTLY_USED)
集更好?
CURLOPT_CLOSEPOLICY One of the CURLCLOSEPOLICY_* values. Note: This option is deprecated, as it was never implemented in cURL and never had any effect.
http://php.net/manual/en/function.curl-setopt.php
只需删除此行