@@ -343,7 +343,7 @@ PHP_FUNCTION(mail)
343343 extra_cmd = php_escape_shell_cmd (extra_cmd );
344344 }
345345
346- if (php_mail (to_r , subject_r , message , headers_str && ZSTR_LEN (headers_str ) ? ZSTR_VAL (headers_str ) : NULL , extra_cmd ? ZSTR_VAL ( extra_cmd ) : NULL )) {
346+ if (php_mail (to_r , subject_r , message , headers_str && ZSTR_LEN (headers_str ) ? ZSTR_VAL (headers_str ) : NULL , extra_cmd )) {
347347 RETVAL_TRUE ;
348348 } else {
349349 RETVAL_FALSE ;
@@ -434,7 +434,7 @@ static int php_mail_detect_multiple_crlf(const char *hdr) {
434434
435435
436436/* {{{ php_mail */
437- PHPAPI bool php_mail (const char * to , const char * subject , const char * message , const char * headers , const char * extra_cmd )
437+ PHPAPI bool php_mail (const char * to , const char * subject , const char * message , const char * headers , const zend_string * extra_cmd )
438438{
439439 FILE * sendmail ;
440440 char * sendmail_path = INI_STR ("sendmail_path" );
@@ -551,7 +551,7 @@ PHPAPI bool php_mail(const char *to, const char *subject, const char *message, c
551551#endif
552552 }
553553 if (extra_cmd != NULL ) {
554- spprintf (& sendmail_cmd , 0 , "%s %s" , sendmail_path , extra_cmd );
554+ spprintf (& sendmail_cmd , 0 , "%s %s" , sendmail_path , ZSTR_VAL ( extra_cmd ) );
555555 } else {
556556 sendmail_cmd = sendmail_path ;
557557 }
0 commit comments