Project

General

Profile

Bug #7447

api_mail aways return NULL - that is false

Added by Torkil Zachariassen over 4 years ago. Updated over 4 years ago.

Status:
Bug resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
15/12/2014
Due date:
% Done:

0%

Estimated time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

api_mail is deprecated and api_mail_html should be used
api_mail therefore calls api_mail_html, but fails to return the result of this call

This was biting us on 1.9.8 using functions like 'Review incoming course requests'
Here is a unified diff which solved the case for us.

Regards Torkil on Chamilo-1.9.8.2, CentOS-7.0.1406, httpd-2.4.6, php-5.4.16, mariadb-5.5.40

--- mail.lib.inc.php.000        2014-12-15 18:34:46.691794212 +0000
+++ mail.lib.inc.php    2014-12-15 19:04:31.117571699 +0000
@@ -31,7 +31,8 @@
  * @deprecated use api_mail_html()
  */
 function api_mail($recipient_name, $recipient_email, $subject, $message, $sender_name = '', $sender_email = '', $extra_headers = '') {
-       api_mail_html($recipient_name, $recipient_email, $subject, $message, $sender_name, $sender_email, $extra_headers);
+  error_log("api_mail is deprecated. Using api_mail_html()");
+  return api_mail_html($recipient_name, $recipient_email, $subject, $message, $sender_name, $sender_email, $extra_headers);
 }

 /**

Associated revisions

Revision 28c6e5e6 (diff)
Added by Julio over 4 years ago

Fixes api_mail_html (adding error log, adding return) see #7447

History

#1

Updated by Julio Montoya over 4 years ago

  • Status changed from New to Bug resolved
  • Target version set to 1.9.10

Also available in: Atom PDF