Skip to content

BUG curl_setopt_array(): supplied argument is not a valid file-handle resource #2222

Description

@demortx

Describe the bug
'debug' => false, - not work
'debug' => true - work
'debug' => 'file.txt' - not work
Error: CRITICAL - 2019-09-15 16:58:33 --> curl_setopt_array(): supplied argument is not a valid File-Handle resource #0 [internal function]: CodeIgniter\Debug\Exceptions->errorHandler(2, 'curl_setopt_arr...', '/var/www/web...', 808, Array) #1 /var/www/web.ru/system/HTTP/CURLRequest.php(808): curl_setopt_array(Resource id #14, Array) #2 /var/www/web.ru/system/HTTP/CURLRequest.php(448): CodeIgniter\HTTP\CURLRequest->sendRequest(Array) #3 /var/www/web.ru/system/HTTP/CURLRequest.php(157): CodeIgniter\HTTP\CURLRequest->send('get', 'https://main.we...') #4 /var/www/web.ru/system/HTTP/CURLRequest.php(174): CodeIgniter\HTTP\CURLRequest->request('get', 'https://main.we...', Array) #5 /var/www/web.ru/app/Config/Services.php(101): CodeIgniter\HTTP\CURLRequest->get('v1/System/uploa...', Array) #6 /var/www/web.ru/app/Modules/Globals/Project/func.php(169): Config\Services::sendApi('v1/System/uploa...', Array) #7 /var/www/web.ru/app/Modules/Globals/Project/Project.php(69): Project\func->ajax_project_upload_settings() #8 /var/www/web.ru/app/Controllers/Main.php(235): App\Modules\Globals\Project\Project->App\Modules\Globals\Project\{closure}() #9 /var/www/web.ru/system/CodeIgniter.php(844): App\Controllers\Main->ajax() #10 /var/www/web.ru/system/CodeIgniter.php(335): CodeIgniter\CodeIgniter->runController(Object(App\Controllers\Main)) #11 /var/www/web.ru/system/CodeIgniter.php(245): CodeIgniter\CodeIgniter->handleRequest(NULL, Object(Config\Cache), false) #12 /var/www/web.ru/public_html/index.php(45): CodeIgniter\CodeIgniter->run() #13 {main}

CodeIgniter 4 version
4.0.0-rc.1

Affected module(s)
system/HTTP/CURLRequest.php
line : 675
if (isset($config['debug'])) { $curl_options[CURLOPT_VERBOSE] = $config['debug'] === true ? 1 : 0; $curl_options[CURLOPT_STDERR] = $config['debug'] === true ? fopen('php://output', 'w+') : $config['debug']; }

Context

  • OS: [linux]
  • Web server [apache2handler]
  • 7.2.19-1+ubuntu16.04.1+deb.sury.org+1
    --

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions