• Resolved ryzedigitalmah

    (@ryzedigitalmah)


    Using PHP8 nd the latest WP version, the RollingCurlX class seems to throw an exception when casting the curl handle to string.
    Since PHP 8 introduced a CurlHandle class, this might need to be changed from
    $key = (string) $ch;
    to
    $key = spl_object_hash($ch);
    If you want to keep compatibility to older PHP Version you might want to wrap it in some kind of if-else
    if(is_resource($ch)) {
    $key = (string) $ch;
    } else {
    $key = spl_object_hash($ch);
    }

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Exception during string cast in PHP 8’ is closed to new replies.