mirror of
https://github.com/php/php-src.git
synced 2024-11-25 10:54:15 +08:00
Unify error messages
This commit is contained in:
parent
2d1b304781
commit
8967b5725b
@ -126,7 +126,7 @@ PHP_FUNCTION(aspell_suggest)
|
||||
sc = (aspell *)zend_list_find(Z_LVAL_PP(scin), &type);
|
||||
if(!sc)
|
||||
{
|
||||
php_error(E_WARNING, "%d is not an ASPELL result index", Z_LVAL_PP(scin));
|
||||
php_error(E_WARNING, "%s(): %d is not an ASPELL result index", get_active_function_name(TSRMLS_C), Z_LVAL_PP(scin));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -160,7 +160,7 @@ PHP_FUNCTION(aspell_check)
|
||||
sc= (aspell *) zend_list_find(Z_LVAL_PP(scin), &type);
|
||||
if(!sc)
|
||||
{
|
||||
php_error(E_WARNING, "%d is not an ASPELL result index", Z_LVAL_PP(scin));
|
||||
php_error(E_WARNING, "%s(): %d is not an ASPELL result index", get_active_function_name(TSRMLS_C), Z_LVAL_PP(scin));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
if (aspell_check(sc, Z_STRVAL_PP(word)))
|
||||
@ -192,7 +192,7 @@ PHP_FUNCTION(aspell_check_raw)
|
||||
sc = (aspell *)zend_list_find(Z_LVAL_PP(scin), &type);
|
||||
if(!sc)
|
||||
{
|
||||
php_error(E_WARNING, "%d is not an ASPELL result index", Z_LVAL_PP(scin));
|
||||
php_error(E_WARNING, "%s(): %d is not an ASPELL result index", get_active_function_name(TSRMLS_C), Z_LVAL_PP(scin));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
if (aspell_check_raw(sc, Z_STRVAL_PP(word)))
|
||||
|
@ -282,7 +282,7 @@ PHP_FUNCTION(bcdiv)
|
||||
Z_TYPE_P(return_value) = IS_STRING;
|
||||
break;
|
||||
case -1: /* division by zero */
|
||||
php_error(E_WARNING, "Division by zero");
|
||||
php_error(E_WARNING, "%s(): Division by zero", get_active_function_name(TSRMLS_C));
|
||||
break;
|
||||
}
|
||||
bc_free_num(&first);
|
||||
@ -323,7 +323,7 @@ PHP_FUNCTION(bcmod)
|
||||
Z_TYPE_P(return_value) = IS_STRING;
|
||||
break;
|
||||
case -1:
|
||||
php_error(E_WARNING, "Division by zero");
|
||||
php_error(E_WARNING, "%s(): Division by zero", get_active_function_name(TSRMLS_C));
|
||||
break;
|
||||
}
|
||||
bc_free_num(&first);
|
||||
@ -409,7 +409,7 @@ PHP_FUNCTION(bcsqrt)
|
||||
Z_STRLEN_P(return_value) = strlen(Z_STRVAL_P(return_value));
|
||||
Z_TYPE_P(return_value) = IS_STRING;
|
||||
} else {
|
||||
php_error(E_WARNING, "Square root of negative number");
|
||||
php_error(E_WARNING, "%s(): Square root of negative number", get_active_function_name(TSRMLS_C));
|
||||
}
|
||||
bc_free_num(&result);
|
||||
return;
|
||||
|
@ -48,7 +48,7 @@ static void _cal_easter(INTERNAL_FUNCTION_PARAMETERS, int gm)
|
||||
}
|
||||
|
||||
if (gm && (year<1970 || year>2037)) { /* out of range for timestamps */
|
||||
php_error(E_WARNING, "easter_date() is only valid for years between 1970 and 2037 inclusive");
|
||||
php_error(E_WARNING, "%s(): This function is only valid for years between 1970 and 2037 inclusive", get_active_function_name(TSRMLS_C));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@ PHP_FUNCTION(ccvs_new) /* cv_new() */
|
||||
|
||||
convert_to_string_ex(psess);
|
||||
if (!Z_STRVAL_PP(psess)) {
|
||||
php_error(E_WARNING, "Invalid session to ccvs_new()");
|
||||
php_error(E_WARNING, "%s(): Invalid session", get_active_function_name(TSRMLS_C));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
@ -576,7 +576,7 @@ PHP_FUNCTION(com_load)
|
||||
}
|
||||
} else {
|
||||
if (!INI_INT("com.allow_dcom")) {
|
||||
php_error(E_WARNING, "DCOM is disabled");
|
||||
php_error(E_WARNING, "%s(): DCOM is disabled", get_active_function_name(TSRMLS_C));
|
||||
RETURN_NULL();
|
||||
} else {
|
||||
flags = CLSCTX_REMOTE_SERVER;
|
||||
@ -621,7 +621,7 @@ PHP_FUNCTION(com_load)
|
||||
if (FAILED(hr)) {
|
||||
php_COM_destruct(obj TSRMLS_CC);
|
||||
error_message = php_COM_error_message(hr TSRMLS_CC);
|
||||
php_error(E_WARNING,"Invalid ProgID, GUID string, or Moniker: %s", error_message);
|
||||
php_error(E_WARNING, "%s(): Invalid ProgID, GUID string, or Moniker: %s", get_active_function_name(TSRMLS_C), error_message);
|
||||
LocalFree(error_message);
|
||||
RETURN_NULL();
|
||||
}
|
||||
@ -679,7 +679,7 @@ PHP_FUNCTION(com_load)
|
||||
if (FAILED(hr)) {
|
||||
error_message = php_COM_error_message(hr TSRMLS_CC);
|
||||
clsid_str = php_string_from_clsid(&clsid TSRMLS_CC);
|
||||
php_error(E_WARNING,"Unable to obtain IDispatch interface for CLSID %s: %s",clsid_str,error_message);
|
||||
php_error(E_WARNING, "%s(): Unable to obtain IDispatch interface for CLSID %s: %s", get_active_function_name(TSRMLS_C), clsid_str, error_message);
|
||||
LocalFree(error_message);
|
||||
efree(clsid_str);
|
||||
php_COM_destruct(obj TSRMLS_CC);
|
||||
@ -753,7 +753,7 @@ int do_COM_invoke(comval *obj, pval *function_name, VARIANT *var_result, pval **
|
||||
break;
|
||||
|
||||
default:
|
||||
php_error(E_WARNING,"Wrong argument count to IEnumVariant::Next()");
|
||||
php_error(E_WARNING, "%s(): Wrong argument count to IEnumVariant::Next()", get_active_function_name(TSRMLS_C));
|
||||
|
||||
return FAILURE;
|
||||
}
|
||||
@ -771,7 +771,7 @@ int do_COM_invoke(comval *obj, pval *function_name, VARIANT *var_result, pval **
|
||||
|
||||
if (FAILED(hr = C_ENUMVARIANT_VT(obj)->Next(C_ENUMVARIANT(obj), count, pSA->pvData, &count))) {
|
||||
char *error_message = php_COM_error_message(hr TSRMLS_CC);
|
||||
php_error(E_WARNING,"IEnumVariant::Next() failed: %s", error_message);
|
||||
php_error(E_WARNING, "%s(): IEnumVariant::Next() failed: %s", get_active_function_name(TSRMLS_C), error_message);
|
||||
efree(error_message);
|
||||
VariantClear(var_result);
|
||||
return FAILURE;
|
||||
@ -781,7 +781,7 @@ int do_COM_invoke(comval *obj, pval *function_name, VARIANT *var_result, pval **
|
||||
rgsabound[0].cElements = count;
|
||||
if (FAILED(SafeArrayRedim(pSA, rgsabound))) {
|
||||
char *error_message = php_COM_error_message(hr TSRMLS_CC);
|
||||
php_error(E_WARNING,"IEnumVariant::Next() failed: %s", error_message);
|
||||
php_error(E_WARNING, "%s(): IEnumVariant::Next() failed: %s", get_active_function_name(TSRMLS_C), error_message);
|
||||
efree(error_message);
|
||||
VariantClear(var_result);
|
||||
return FAILURE;
|
||||
@ -819,7 +819,7 @@ int do_COM_invoke(comval *obj, pval *function_name, VARIANT *var_result, pval **
|
||||
} else if (C_HASENUM(obj) && strstr(Z_STRVAL_P(function_name), "reset")) {
|
||||
if (FAILED(hr = C_ENUMVARIANT_VT(obj)->Reset(C_ENUMVARIANT(obj)))) {
|
||||
char *error_message = php_COM_error_message(hr TSRMLS_CC);
|
||||
php_error(E_WARNING,"IEnumVariant::Next() failed: %s", error_message);
|
||||
php_error(E_WARNING,"%s(): IEnumVariant::Next() failed: %s", get_active_function_name(TSRMLS_C), error_message);
|
||||
efree(error_message);
|
||||
return FAILURE;
|
||||
}
|
||||
@ -838,12 +838,12 @@ int do_COM_invoke(comval *obj, pval *function_name, VARIANT *var_result, pval **
|
||||
break;
|
||||
|
||||
default:
|
||||
php_error(E_WARNING,"Wrong argument count to IEnumVariant::Skip()");
|
||||
php_error(E_WARNING, "%s(): Wrong argument count to IEnumVariant::Skip()", get_active_function_name(TSRMLS_C));
|
||||
return FAILURE;
|
||||
}
|
||||
if (FAILED(hr = C_ENUMVARIANT_VT(obj)->Skip(C_ENUMVARIANT(obj), count))) {
|
||||
char *error_message = php_COM_error_message(hr TSRMLS_CC);
|
||||
php_error(E_WARNING,"IEnumVariant::Next() failed: %s", error_message);
|
||||
php_error(E_WARNING,"%s(): IEnumVariant::Next() failed: %s", get_active_function_name(TSRMLS_C), error_message);
|
||||
efree(error_message);
|
||||
return FAILURE;
|
||||
}
|
||||
@ -858,7 +858,7 @@ int do_COM_invoke(comval *obj, pval *function_name, VARIANT *var_result, pval **
|
||||
|
||||
if (FAILED(hr)) {
|
||||
error_message = php_COM_error_message(hr TSRMLS_CC);
|
||||
php_error(E_WARNING,"Unable to lookup %s: %s", Z_STRVAL_P(function_name), error_message);
|
||||
php_error(E_WARNING, "%s(): Unable to lookup %s: %s", get_active_function_name(TSRMLS_C), Z_STRVAL_P(function_name), error_message);
|
||||
LocalFree(error_message);
|
||||
efree(funcname);
|
||||
return FAILURE;
|
||||
@ -891,10 +891,10 @@ int do_COM_invoke(comval *obj, pval *function_name, VARIANT *var_result, pval **
|
||||
if (FAILED(hr)) {
|
||||
error_message = php_COM_error_message(hr TSRMLS_CC);
|
||||
if (ErrString) {
|
||||
php_error(E_WARNING,"Invoke() failed: %s %s", error_message, ErrString);
|
||||
php_error(E_WARNING, "%s(): Invoke() failed: %s %s", get_active_function_name(TSRMLS_C), error_message, ErrString);
|
||||
pefree(ErrString, 1);
|
||||
} else {
|
||||
php_error(E_WARNING,"Invoke() failed: %s", error_message);
|
||||
php_error(E_WARNING, "%s(): Invoke() failed: %s", get_active_function_name(TSRMLS_C), error_message);
|
||||
}
|
||||
LocalFree(error_message);
|
||||
return FAILURE;
|
||||
@ -930,7 +930,7 @@ PHP_FUNCTION(com_invoke)
|
||||
convert_to_long(object);
|
||||
obj = (comval *)zend_list_find(Z_LVAL_P(object), &type);
|
||||
if (!obj || (type != IS_COM)) {
|
||||
php_error(E_WARNING,"%d is not a COM object handler", Z_STRVAL_P(function_name));
|
||||
php_error(E_WARNING,"%s(): %d is not a COM object handler", get_active_function_name(TSRMLS_C), Z_STRVAL_P(function_name));
|
||||
RETURN_NULL();
|
||||
}
|
||||
|
||||
@ -974,7 +974,7 @@ PHP_FUNCTION(com_release)
|
||||
convert_to_long_ex(&object);
|
||||
obj = (comval *)zend_list_find(Z_LVAL_P(object), &type);
|
||||
if (!obj || (type != IS_COM)) {
|
||||
php_error(E_WARNING,"%d is not a COM object handler");
|
||||
php_error(E_WARNING, "%s(): %d is not a COM object handler", get_active_function_name(TSRMLS_C));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1005,7 +1005,7 @@ PHP_FUNCTION(com_addref)
|
||||
obj = (comval *)zend_list_find(Z_LVAL_P(object), &type);
|
||||
if (!obj || (type != IS_COM))
|
||||
{
|
||||
php_error(E_WARNING,"%d is not a COM object handler");
|
||||
php_error(E_WARNING, "%s(): %d is not a COM object handler", get_active_function_name(TSRMLS_C));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1500,7 +1500,7 @@ static int do_COM_propget(VARIANT *var_result, comval *obj, pval *arg_property,
|
||||
|
||||
if (FAILED(hr)) {
|
||||
error_message = php_COM_error_message(hr TSRMLS_CC);
|
||||
php_error(E_WARNING,"Unable to lookup %s: %s", Z_STRVAL_P(arg_property), error_message);
|
||||
php_error(E_WARNING, "%s(): Unable to lookup %s: %s", get_active_function_name(TSRMLS_C), Z_STRVAL_P(arg_property), error_message);
|
||||
LocalFree(error_message);
|
||||
efree(propname);
|
||||
if (cleanup) {
|
||||
@ -1517,10 +1517,10 @@ static int do_COM_propget(VARIANT *var_result, comval *obj, pval *arg_property,
|
||||
if (FAILED(hr)) {
|
||||
error_message = php_COM_error_message(hr TSRMLS_CC);
|
||||
if (ErrString) {
|
||||
php_error(E_WARNING,"PropGet() failed: %s %s", error_message, ErrString);
|
||||
php_error(E_WARNING, "%s(): PropGet() failed: %s %s", get_active_function_name(TSRMLS_C), error_message, ErrString);
|
||||
pefree(ErrString, 1);
|
||||
} else {
|
||||
php_error(E_WARNING,"PropGet() failed: %s", error_message);
|
||||
php_error(E_WARNING, "%s(): PropGet() failed: %s", get_active_function_name(TSRMLS_C), error_message);
|
||||
}
|
||||
LocalFree(error_message);
|
||||
efree(propname);
|
||||
@ -1559,7 +1559,7 @@ static void do_COM_propput(pval *return_value, comval *obj, pval *arg_property,
|
||||
|
||||
if (FAILED(hr)) {
|
||||
error_message = php_COM_error_message(hr TSRMLS_CC);
|
||||
php_error(E_WARNING,"Unable to lookup %s: %s", Z_STRVAL_P(arg_property), error_message);
|
||||
php_error(E_WARNING, "%s(): Unable to lookup %s: %s", get_active_function_name(TSRMLS_C), Z_STRVAL_P(arg_property), error_message);
|
||||
LocalFree(error_message);
|
||||
efree(propname);
|
||||
|
||||
@ -1580,10 +1580,10 @@ static void do_COM_propput(pval *return_value, comval *obj, pval *arg_property,
|
||||
if (FAILED(hr)) {
|
||||
error_message = php_COM_error_message(hr TSRMLS_CC);
|
||||
if (ErrString) {
|
||||
php_error(E_WARNING,"PropPut() failed: %s %s", error_message, ErrString);
|
||||
php_error(E_WARNING, "%s(): PropPut() failed: %s %s", get_active_function_name(TSRMLS_C), error_message, ErrString);
|
||||
pefree(ErrString, 1);
|
||||
} else {
|
||||
php_error(E_WARNING,"PropPut() failed: %s", error_message);
|
||||
php_error(E_WARNING, "%s(): PropPut() failed: %s", get_active_function_name(TSRMLS_C), error_message);
|
||||
}
|
||||
LocalFree(error_message);
|
||||
|
||||
@ -1637,7 +1637,7 @@ PHP_FUNCTION(com_propget)
|
||||
convert_to_long(arg_comval);
|
||||
obj = (comval *)zend_list_find(Z_LVAL_P(arg_comval), &type);
|
||||
if (!obj || (type != IS_COM)) {
|
||||
php_error(E_WARNING,"%d is not a COM object handler", Z_LVAL_P(arg_comval));
|
||||
php_error(E_WARNING, "%s(): %d is not a COM object handler", get_active_function_name(TSRMLS_C), Z_LVAL_P(arg_comval));
|
||||
RETURN_NULL();
|
||||
}
|
||||
convert_to_string_ex(&arg_property);
|
||||
@ -1671,7 +1671,7 @@ PHP_FUNCTION(com_propput)
|
||||
/* obtain comval interface */
|
||||
obj = (comval *)zend_list_find(Z_LVAL_P(arg_comval), &type);
|
||||
if (!obj || (type != IS_COM)) {
|
||||
php_error(E_WARNING,"%d is not a COM object handler", Z_LVAL_P(arg_comval));
|
||||
php_error(E_WARNING, "%s(): %d is not a COM object handler", get_active_function_name(TSRMLS_C), Z_LVAL_P(arg_comval));
|
||||
RETURN_NULL();
|
||||
}
|
||||
convert_to_string_ex(&arg_property);
|
||||
@ -2213,7 +2213,7 @@ PHPAPI int php_COM_load_typelib(ITypeLib *TypeLib, int mode TSRMLS_DC)
|
||||
/* Oops, it already exists. No problem if it is defined as the same value */
|
||||
/* Check to see if they are the same */
|
||||
if (!compare_function(&results, &c.value, &exists TSRMLS_CC) && INI_INT("com.autoregister_verbose")) {
|
||||
php_error(E_WARNING,"Type library value %s is already defined and has a different value", c.name);
|
||||
php_error(E_WARNING, "%s(): Type library value %s is already defined and has a different value", get_active_function_name(TSRMLS_C), c.name);
|
||||
}
|
||||
free(c.name);
|
||||
j++;
|
||||
@ -2259,7 +2259,7 @@ PHP_FUNCTION(com_isenum)
|
||||
zend_hash_index_find(Z_OBJPROP_P(object), 0, (void **) &comval_handle);
|
||||
obj = (comval *) zend_list_find(Z_LVAL_PP(comval_handle), &type);
|
||||
if (!obj || (type != IS_COM)) {
|
||||
php_error(E_WARNING,"%s is not a COM object handler", "");
|
||||
php_error(E_WARNING,"%s(): %s is not a COM object handler", get_active_function_name(TSRMLS_C), "");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
162
ext/cpdf/cpdf.c
162
ext/cpdf/cpdf.c
@ -262,7 +262,7 @@ PHP_FUNCTION(cpdf_set_creator)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if (!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d (type=%d)", id, type);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d (type=%d)", get_active_function_name(TSRMLS_C), id, type);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -289,7 +289,7 @@ PHP_FUNCTION(cpdf_set_title)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if (!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d (type=%d)", id, type);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d (type=%d)", get_active_function_name(TSRMLS_C), id, type);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -317,7 +317,7 @@ PHP_FUNCTION(cpdf_set_subject)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if (!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d (type=%d)", id, type);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d (type=%d)", get_active_function_name(TSRMLS_C), id, type);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -344,7 +344,7 @@ PHP_FUNCTION(cpdf_set_keywords)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if (!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d (type=%d)", id, type);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d (type=%d)", get_active_function_name(TSRMLS_C), id, type);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -377,7 +377,7 @@ PHP_FUNCTION(cpdf_set_viewer_preferences)
|
||||
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -471,7 +471,7 @@ PHP_FUNCTION(cpdf_open)
|
||||
convert_to_string(arg2);
|
||||
#if APACHE
|
||||
if(strcmp(Z_STRVAL_P(arg2), "-") == 0)
|
||||
php_error(E_WARNING, "Writing to stdout as described in the ClibPDF manual is not possible if php is used as an Apache module. Write to a memory stream and use cpdf_output_buffer() instead.");
|
||||
php_error(E_WARNING, "%s(): Writing to stdout as described in the ClibPDF manual is not possible if php is used as an Apache module. Write to a memory stream and use cpdf_output_buffer() instead.", get_active_function_name(TSRMLS_C));
|
||||
#endif
|
||||
cpdf_setOutputFilename(cpdf, Z_STRVAL_P(arg2));
|
||||
}
|
||||
@ -498,7 +498,7 @@ PHP_FUNCTION(cpdf_close)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
zend_list_delete(id);
|
||||
@ -536,7 +536,7 @@ PHP_FUNCTION(cpdf_page_init)
|
||||
width = Z_LVAL_P(argv[4]);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -571,7 +571,7 @@ PHP_FUNCTION(cpdf_finalize_page)
|
||||
pagenr=Z_LVAL_P(arg2);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -599,7 +599,7 @@ PHP_FUNCTION(cpdf_set_current_page)
|
||||
pagenr=Z_LVAL_P(arg2);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -625,7 +625,7 @@ PHP_FUNCTION(cpdf_begin_text)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -651,7 +651,7 @@ PHP_FUNCTION(cpdf_end_text)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -678,7 +678,7 @@ PHP_FUNCTION(cpdf_show)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -709,7 +709,7 @@ PHP_FUNCTION(cpdf_show_xy)
|
||||
id=Z_LVAL_P(argv[0]);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -743,7 +743,7 @@ PHP_FUNCTION(cpdf_continue_text)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -770,7 +770,7 @@ PHP_FUNCTION(cpdf_text)
|
||||
id=Z_LVAL_P(argv[0]);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -862,12 +862,12 @@ PHP_FUNCTION(cpdf_set_font)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
/* if(Z_LVAL_P(arg4) > 6) {
|
||||
php_error(E_WARNING, "Font encoding set to 5");
|
||||
php_error(E_WARNING, "%s(): Font encoding set to 5", get_active_function_name(TSRMLS_C));
|
||||
Z_LVAL_P(arg4) = 5;
|
||||
}
|
||||
*/
|
||||
@ -895,7 +895,7 @@ PHP_FUNCTION(cpdf_set_font_directories)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -922,7 +922,7 @@ PHP_FUNCTION(cpdf_set_font_map_file)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -949,7 +949,7 @@ PHP_FUNCTION(cpdf_set_leading)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -976,7 +976,7 @@ PHP_FUNCTION(cpdf_set_text_rendering)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1003,7 +1003,7 @@ PHP_FUNCTION(cpdf_set_horiz_scaling)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1030,7 +1030,7 @@ PHP_FUNCTION(cpdf_set_text_rise)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1061,12 +1061,12 @@ PHP_FUNCTION(cpdf_set_text_matrix)
|
||||
matrix=Z_ARRVAL_P(arg2);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if(zend_hash_num_elements(matrix) != 6) {
|
||||
php_error(E_WARNING, "Text matrix must have 6 elements");
|
||||
php_error(E_WARNING, "%s(): Text matrix must have 6 elements", get_active_function_name(TSRMLS_C));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1113,7 +1113,7 @@ PHP_FUNCTION(cpdf_set_text_pos)
|
||||
id=Z_LVAL_P(argv[0]);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1147,7 +1147,7 @@ PHP_FUNCTION(cpdf_rotate_text)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1174,7 +1174,7 @@ PHP_FUNCTION(cpdf_set_char_spacing)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1201,7 +1201,7 @@ PHP_FUNCTION(cpdf_set_word_spacing)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1229,7 +1229,7 @@ PHP_FUNCTION(cpdf_stringwidth)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1255,7 +1255,7 @@ PHP_FUNCTION(cpdf_save)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1281,7 +1281,7 @@ PHP_FUNCTION(cpdf_restore)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1309,7 +1309,7 @@ PHP_FUNCTION(cpdf_translate)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1337,7 +1337,7 @@ PHP_FUNCTION(cpdf_scale)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1364,7 +1364,7 @@ PHP_FUNCTION(cpdf_rotate)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1391,12 +1391,12 @@ PHP_FUNCTION(cpdf_setflat)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if((Z_LVAL_P(arg2) > 100) && (Z_LVAL_P(arg2) < 0)) {
|
||||
php_error(E_WARNING, "Parameter of pdf_setflat() has to between 0 and 100");
|
||||
php_error(E_WARNING, "%s(): Parameter has to between 0 and 100", get_active_function_name(TSRMLS_C));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1423,12 +1423,12 @@ PHP_FUNCTION(cpdf_setlinejoin)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if((Z_LVAL_P(arg2) > 2) && (Z_LVAL_P(arg2) < 0)) {
|
||||
php_error(E_WARNING, "Parameter of pdf_setlinejoin() has to between 0 and 2");
|
||||
php_error(E_WARNING, "%s(): Parameter has to between 0 and 2", get_active_function_name(TSRMLS_C));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1455,12 +1455,12 @@ PHP_FUNCTION(cpdf_setlinecap)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if((Z_LVAL_P(arg2) > 2) && (Z_LVAL_P(arg2) < 0)) {
|
||||
php_error(E_WARNING, "Parameter of pdf_setlinecap() has to be > 0 and =< 2");
|
||||
php_error(E_WARNING, "%s(): Parameter has to be > 0 and =< 2", get_active_function_name(TSRMLS_C));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1487,12 +1487,12 @@ PHP_FUNCTION(cpdf_setmiterlimit)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if(Z_DVAL_P(arg2) < 1) {
|
||||
php_error(E_WARNING, "Parameter of pdf_setmiterlimit() has to be >= 1");
|
||||
php_error(E_WARNING, "%s(): Parameter has to be >= 1", get_active_function_name(TSRMLS_C));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1519,7 +1519,7 @@ PHP_FUNCTION(cpdf_setlinewidth)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1549,7 +1549,7 @@ PHP_FUNCTION(cpdf_setdash)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1581,7 +1581,7 @@ PHP_FUNCTION(cpdf_moveto)
|
||||
id=Z_LVAL_P(argv[0]);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1618,7 +1618,7 @@ PHP_FUNCTION(cpdf_rmoveto)
|
||||
id=Z_LVAL_P(argv[0]);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1659,7 +1659,7 @@ PHP_FUNCTION(cpdf_curveto)
|
||||
id=Z_LVAL_P(argv[0]);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1706,7 +1706,7 @@ PHP_FUNCTION(cpdf_lineto)
|
||||
id=Z_LVAL_P(argv[0]);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1743,7 +1743,7 @@ PHP_FUNCTION(cpdf_rlineto)
|
||||
id=Z_LVAL_P(argv[0]);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1781,7 +1781,7 @@ PHP_FUNCTION(cpdf_circle)
|
||||
id=Z_LVAL_P(argv[0]);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1821,7 +1821,7 @@ PHP_FUNCTION(cpdf_arc)
|
||||
id=Z_LVAL_P(argv[0]);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1860,7 +1860,7 @@ PHP_FUNCTION(cpdf_rect)
|
||||
id=Z_LVAL_P(argv[0]);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1899,7 +1899,7 @@ PHP_FUNCTION(cpdf_newpath)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1925,7 +1925,7 @@ PHP_FUNCTION(cpdf_closepath)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1951,7 +1951,7 @@ PHP_FUNCTION(cpdf_closepath_stroke)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -1978,7 +1978,7 @@ PHP_FUNCTION(cpdf_stroke)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -2004,7 +2004,7 @@ PHP_FUNCTION(cpdf_fill)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -2030,7 +2030,7 @@ PHP_FUNCTION(cpdf_fill_stroke)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -2057,7 +2057,7 @@ PHP_FUNCTION(cpdf_closepath_fill_stroke)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -2085,7 +2085,7 @@ PHP_FUNCTION(cpdf_clip)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -2112,7 +2112,7 @@ PHP_FUNCTION(cpdf_setgray_fill)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -2139,7 +2139,7 @@ PHP_FUNCTION(cpdf_setgray_stroke)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -2166,7 +2166,7 @@ PHP_FUNCTION(cpdf_setgray)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -2195,7 +2195,7 @@ PHP_FUNCTION(cpdf_setrgbcolor_fill)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -2224,7 +2224,7 @@ PHP_FUNCTION(cpdf_setrgbcolor_stroke)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -2253,7 +2253,7 @@ PHP_FUNCTION(cpdf_setrgbcolor)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -2284,7 +2284,7 @@ PHP_FUNCTION(cpdf_set_page_animation)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -2311,7 +2311,7 @@ PHP_FUNCTION(cpdf_finalize)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -2338,7 +2338,7 @@ PHP_FUNCTION(cpdf_output_buffer)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -2367,13 +2367,13 @@ PHP_FUNCTION(cpdf_save_to_file)
|
||||
id=Z_LVAL_P(arg1);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
#if APACHE
|
||||
if(strcmp(Z_STRVAL_P(arg2), "-") == 0)
|
||||
php_error(E_WARNING, "Writing to stdout as described in the ClibPDF manual is not possible if php is used as an Apache module. Use cpdf_output_buffer() instead.");
|
||||
php_error(E_WARNING, "%s(): Writing to stdout as described in the ClibPDF manual is not possible if php is used as an Apache module. Use cpdf_output_buffer() instead.", get_active_function_name(TSRMLS_C));
|
||||
#endif
|
||||
|
||||
cpdf_savePDFmemoryStreamToFile(pdf, Z_STRVAL_P(arg2));
|
||||
@ -2414,7 +2414,7 @@ PHP_FUNCTION(cpdf_import_jpeg)
|
||||
id=Z_LVAL_P(argv[0]);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -2478,7 +2478,7 @@ PHP_FUNCTION(cpdf_place_inline_image)
|
||||
id=Z_LVAL_P(argv[0]);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -2488,11 +2488,11 @@ PHP_FUNCTION(cpdf_place_inline_image)
|
||||
ZEND_GET_RESOURCE_TYPE_ID(CPDF_GLOBAL(le_gd), "gd");
|
||||
if(!CPDF_GLOBAL(le_gd))
|
||||
{
|
||||
php_error(E_ERROR, "Unable to find handle for GD image stream. Please check the GD extension is loaded.");
|
||||
php_error(E_ERROR, "%s(): Unable to find handle for GD image stream. Please check the GD extension is loaded.", get_active_function_name(TSRMLS_C));
|
||||
}
|
||||
|
||||
if (!im || type != CPDF_GLOBAL(le_gd)) {
|
||||
php_error(E_WARNING, "cpdf: Unable to find image pointer");
|
||||
php_error(E_WARNING, "%s(): Unable to find image pointer", get_active_function_name(TSRMLS_C));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -2567,7 +2567,7 @@ PHP_FUNCTION(cpdf_add_annotation)
|
||||
id=Z_LVAL_P(argv[0]);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -2626,7 +2626,7 @@ PHP_FUNCTION(cpdf_set_action_url)
|
||||
id=Z_LVAL_P(argv[0]);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -2683,7 +2683,7 @@ PHP_FUNCTION(cpdf_add_outline)
|
||||
id=Z_LVAL_P(argv[0]);
|
||||
pdf = zend_list_find(id, &type);
|
||||
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
|
||||
php_error(E_WARNING, "Unable to find identifier %d", id);
|
||||
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -2691,7 +2691,7 @@ PHP_FUNCTION(cpdf_add_outline)
|
||||
lastoutline = zend_list_find(oid, &type);
|
||||
if(!lastoutline || type!=CPDF_GLOBAL(le_outline)) {
|
||||
lastoutline = NULL;
|
||||
/* php_error(E_WARNING, "Unable to find last outline entry %d", id);
|
||||
/* php_error(E_WARNING, "%s(): Unable to find last outline entry %d", get_active_function_name(TSRMLS_C), id);
|
||||
RETURN_FALSE; */
|
||||
}
|
||||
|
||||
|
@ -318,7 +318,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, "Couldn't call the CURLOPT_WRITEFUNCTION");
|
||||
php_error(E_WARNING, "%s(): Couldn't call the CURLOPT_WRITEFUNCTION", get_active_function_name(TSRMLS_C));
|
||||
length = -1;
|
||||
}
|
||||
else {
|
||||
@ -372,7 +372,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, "Cannot call the CURLOPT_READFUNCTION");
|
||||
php_error(E_WARNING, "%s(): Cannot call the CURLOPT_READFUNCTION", get_active_function_name(TSRMLS_C));
|
||||
length = -1;
|
||||
}
|
||||
else {
|
||||
@ -431,7 +431,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, "Couldn't call the CURLOPT_HEADERFUNCTION");
|
||||
php_error(E_WARNING, "%s(): Couldn't call the CURLOPT_HEADERFUNCTION", get_active_function_name(TSRMLS_C));
|
||||
length = -1;
|
||||
}
|
||||
else {
|
||||
@ -475,12 +475,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, "Couldn't call the CURLOPT_PASSWDFUNCTION");
|
||||
php_error(E_WARNING, "%s(): Couldn't call the CURLOPT_PASSWDFUNCTION", get_active_function_name(TSRMLS_C));
|
||||
ret = -1;
|
||||
}
|
||||
else {
|
||||
if (Z_STRLEN_P(retval) > buflen) {
|
||||
php_error(E_WARNING, "Returned password is too long for libcurl to handle");
|
||||
php_error(E_WARNING, "%s(): Returned password is too long for libcurl to handle", get_active_function_name(TSRMLS_C));
|
||||
ret = -1;
|
||||
}
|
||||
else {
|
||||
@ -570,7 +570,7 @@ PHP_FUNCTION(curl_init)
|
||||
|
||||
ch->cp = curl_easy_init();
|
||||
if (! ch->cp) {
|
||||
php_error(E_WARNING, "Cannot initialize a new cURL handle");
|
||||
php_error(E_WARNING, "%s(): Cannot initialize a new cURL handle", get_active_function_name(TSRMLS_C));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -771,7 +771,7 @@ PHP_FUNCTION(curl_setopt)
|
||||
|
||||
postfields = HASH_OF(*zvalue);
|
||||
if (! postfields) {
|
||||
php_error(E_WARNING, "Couldn't get HashTable in CURLOPT_POSTFIELDS");
|
||||
php_error(E_WARNING, "%s(): Couldn't get HashTable in CURLOPT_POSTFIELDS", get_active_function_name(TSRMLS_C));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -827,8 +827,8 @@ PHP_FUNCTION(curl_setopt)
|
||||
ph = HASH_OF(*zvalue);
|
||||
if (! ph) {
|
||||
php_error(E_WARNING,
|
||||
"You must pass either an object or an array with the CURLOPT_HTTPHEADER,"
|
||||
"CURLOPT_QUOTE and CURLOPT_POSTQUOTE arguments");
|
||||
"%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));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -844,7 +844,7 @@ PHP_FUNCTION(curl_setopt)
|
||||
slist = curl_slist_append(slist, indiv);
|
||||
if (! slist) {
|
||||
efree(indiv);
|
||||
php_error(E_WARNING, "Couldn't build curl_slist from curl_setopt()");
|
||||
php_error(E_WARNING, "%s(): Couldn't build curl_slist", get_active_function_name(TSRMLS_C));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
zend_llist_add_element(&ch->to_free.str, &indiv);
|
||||
|
@ -105,7 +105,7 @@ PHP_FUNCTION(cybercash_encr)
|
||||
macbuff);
|
||||
|
||||
if (array_init(return_value) == FAILURE) {
|
||||
php_error(E_WARNING, "Return value from cybercash_encr could not be initialized");
|
||||
php_error(E_WARNING, "%s(): Return value could not be initialized", get_active_function_name(TSRMLS_C));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -156,7 +156,7 @@ PHP_FUNCTION(cybercash_decr)
|
||||
macbuff);
|
||||
|
||||
if (array_init(return_value) == FAILURE) {
|
||||
php_error(E_WARNING, "Could not initialize Return value from cybercash_decr");
|
||||
php_error(E_WARNING, "%s(): Could not initialize return value", get_active_function_name(TSRMLS_C));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
@ -167,11 +167,11 @@ PHP_FUNCTION(cyrus_connect)
|
||||
break;
|
||||
|
||||
case -1:
|
||||
php_error(E_WARNING, "Invalid hostname: %s", host);
|
||||
php_error(E_WARNING, "%s(): Invalid hostname: %s", get_active_function_name(TSRMLS_C), host);
|
||||
RETURN_FALSE;
|
||||
|
||||
case -2:
|
||||
php_error(E_WARNING, "Invalid port: %d", port);
|
||||
php_error(E_WARNING, "%s(): Invalid port: %d", get_active_function_name(TSRMLS_C), port);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -285,7 +285,7 @@ PHP_FUNCTION(cyrus_authenticate)
|
||||
if (! user) {
|
||||
struct passwd *pwd = getpwuid(getuid());
|
||||
if (! pwd) {
|
||||
php_error(E_WARNING, "Couldn't determine user id");
|
||||
php_error(E_WARNING, "%s(): Couldn't determine user id", get_active_function_name(TSRMLS_C));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -358,8 +358,8 @@ static void cyrus_generic_callback(struct imclient *client,
|
||||
|
||||
if (call_user_function_ex(EG(function_table), NULL, callback->function,
|
||||
&retval, 4, argv, 0, NULL TSRMLS_CC) == FAILURE) {
|
||||
php_error(E_WARNING, "Couldn't call the %s handler",
|
||||
callback->trigger);
|
||||
php_error(E_WARNING, "%s(): Couldn't call the %s handler",
|
||||
get_active_function_name(TSRMLS_C), callback->trigger);
|
||||
}
|
||||
|
||||
zval_ptr_dtor(argv[0]);
|
||||
@ -398,7 +398,7 @@ PHP_FUNCTION(cyrus_bind)
|
||||
hash = HASH_OF(*z_callback);
|
||||
if (! hash) {
|
||||
php_error(E_WARNING,
|
||||
"Second argument to cyrus_bind() must be an array or object");
|
||||
"%s(): Second argument must be an array or object", get_active_function_name(TSRMLS_C));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -425,12 +425,12 @@ PHP_FUNCTION(cyrus_bind)
|
||||
}
|
||||
|
||||
if (! callback.trigger) {
|
||||
php_error(E_WARNING, "You must specify a trigger in your callback");
|
||||
php_error(E_WARNING, "%s(): You must specify a trigger in your callback", get_active_function_name(TSRMLS_C));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (! callback.function) {
|
||||
php_error(E_WARNING, "You must specify a function in your callback");
|
||||
php_error(E_WARNING, "%s(): You must specify a function in your callback", get_active_function_name(TSRMLS_C));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user