#36248 [Opn]: CURLOPT_HEADERFUNCTION, couldn't set the function in the class

From: Date: Wed, 01 Feb 2006 16:40:51 +0000
Subject: #36248 [Opn]: CURLOPT_HEADERFUNCTION, couldn't set the function in the class
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-92785@lists.php.net to get a copy of this message
 ID:               36248
 User updated by:  Admin at relax-info dot com
 Reported By:      Admin at relax-info dot com
 Status:           Open
 Bug Type:         cURL related
 Operating System: WIN XP SP2
 PHP Version:      4.4.2
 New Comment:

Sorry, callback function example...
	function _header_callback($ch, $header)
	{
//		print_r($header);
	}


Previous Comments:
------------------------------------------------------------------------

[2006-02-01 17:39:51] Admin at relax-info dot com

Description:
------------
Couldn't set the name of a callback function where the callback
function exists in a class, array($this, 'callback_function'). Apache
die ...


Reproduce code:
---------------
class CURL
{
var $_ch;
.....
$this->_ch = curl_init();
..
curl_setopt($this->_ch, CURLOPT_HEADERFUNCTION, array($this,
'_header_callback'));
..
}

Expected result:
----------------
The name of a callback function can be method of class
array($this, 'callback_function')

Actual result:
--------------
Apache die ...


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=36248&edit=1


Thread (9 messages)

« previous php.bugs (#92785) next »