summaryrefslogtreecommitdiff
path: root/ext/curl
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2003-01-18 21:31:11 +0000
committerIlia Alshanetsky <iliaa@php.net>2003-01-18 21:31:11 +0000
commitaebb39b0143f6f49edafc6159e9b7a3345833618 (patch)
treeed4f68fa425d205828d78a8a81e688d381a02413 /ext/curl
parentb2ecf477550ab799c82d65e9eddd5260865556bf (diff)
downloadphp-git-aebb39b0143f6f49edafc6159e9b7a3345833618.tar.gz
Changed php_error to php_error_docref.
Thanks to Marcus Börger for writing a script that significantly simplifies this process.
Diffstat (limited to 'ext/curl')
-rw-r--r--ext/curl/interface.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index a4118dcb85..8602e529d4 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -400,8 +400,7 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
t->func,
retval, 2, argv TSRMLS_CC);
if (error == FAILURE) {
- php_error(E_WARNING, "%s(): Couldn't call the CURLOPT_WRITEFUNCTION",
- get_active_function_name(TSRMLS_C));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't call the CURLOPT_WRITEFUNCTION");
length = -1;
}
else {
@@ -455,8 +454,7 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
t->func,
retval, 3, argv TSRMLS_CC);
if (error == FAILURE) {
- php_error(E_WARNING, "%s(): Cannot call the CURLOPT_READFUNCTION",
- get_active_function_name(TSRMLS_C));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot call the CURLOPT_READFUNCTION");
length = -1;
}
else {
@@ -515,8 +513,7 @@ static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx
t->func,
retval, 2, argv TSRMLS_CC);
if (error == FAILURE) {
- php_error(E_WARNING, "%s(): Couldn't call the CURLOPT_HEADERFUNCTION",
- get_active_function_name(TSRMLS_C));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't call the CURLOPT_HEADERFUNCTION");
length = -1;
}
else {
@@ -560,13 +557,12 @@ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
func,
retval, 2, argv TSRMLS_CC);
if (error == FAILURE) {
- php_error(E_WARNING, "%s(): Couldn't call the CURLOPT_PASSWDFUNCTION", get_active_function_name(TSRMLS_C));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't call the CURLOPT_PASSWDFUNCTION");
ret = -1;
}
else {
if (Z_STRLEN_P(retval) > buflen) {
- php_error(E_WARNING, "%s(): Returned password is too long for libcurl to handle",
- get_active_function_name(TSRMLS_C));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Returned password is too long for libcurl to handle");
ret = -1;
}
else {
@@ -687,7 +683,7 @@ PHP_FUNCTION(curl_init)
ch->cp = curl_easy_init();
if (! ch->cp) {
- php_error(E_WARNING, "%s(): Cannot initialize a new cURL handle", get_active_function_name(TSRMLS_C));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot initialize a new cURL handle");
RETURN_FALSE;
}
@@ -924,9 +920,7 @@ PHP_FUNCTION(curl_setopt)
postfields = HASH_OF(*zvalue);
if (! postfields) {
- php_error(E_WARNING,
- "%s(): Couldn't get HashTable in CURLOPT_POSTFIELDS",
- get_active_function_name(TSRMLS_C));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't get HashTable in CURLOPT_POSTFIELDS");
RETURN_FALSE;
}
@@ -988,9 +982,7 @@ PHP_FUNCTION(curl_setopt)
ph = HASH_OF(*zvalue);
if (!ph) {
- php_error(E_WARNING,
- "%s(): You must pass either an object or an array with the CURLOPT_HTTPHEADER, "
- "CURLOPT_QUOTE and CURLOPT_POSTQUOTE arguments", get_active_function_name(TSRMLS_C));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must pass either an object or an array with the CURLOPT_HTTPHEADER, CURLOPT_QUOTE and CURLOPT_POSTQUOTE arguments");
RETURN_FALSE;
}
@@ -1006,8 +998,7 @@ PHP_FUNCTION(curl_setopt)
slist = curl_slist_append(slist, indiv);
if (! slist) {
efree(indiv);
- php_error(E_WARNING, "%s(): Couldn't build curl_slist",
- get_active_function_name(TSRMLS_C));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't build curl_slist");
RETURN_FALSE;
}
zend_llist_add_element(&ch->to_free.str, &indiv);