Bug #80491 [NEW]: curl_init() returns object instead of resource
From: ricardo at banak dot com
Operating system: Centos 7.9.2009
PHP version: 8.0.0
Package: cURL related
Bug Type: Bug
Bug description:curl_init() returns object instead of resource
Description:
------------
Documentation states curl_init() as:
curl_init ([ string $url = NULL ] ) : resource
but the result is an object, not a resource.
Test script:
---------------
$ch = curl_init();
if (is_object($ch)) {
echo '$ch is an object';
}
if (is_resource($ch)) {
echo '$ch is a resource';
}
Expected result:
----------------
Expected:
$ch is a resource
Currently:
$ch is an object
--
Edit bug report at https://bugs.php.net/bug.php?id=80491&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80491&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80491&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80491&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80491&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80491&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80491&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80491&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80491&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80491&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80491&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80491&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80491&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80491&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80491&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80491&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80491&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80491&r=mysqlcfg
Thread (1 message)
- ricardo at banak dot com