strikt types
This commit is contained in:
10
mail.php
10
mail.php
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
function send_mail($an, $betreff, $text, $ok = '', $error = '') {
|
||||
declare(strict_types=1);
|
||||
|
||||
function send_mail(string $an, string $betreff, string $text, string $ok = '', string $error = ''): void {
|
||||
global $absender;
|
||||
$sender = 'noreply@troy-grunt.de';
|
||||
if(isset($absender) && $absender) {
|
||||
@@ -23,7 +25,7 @@ function send_mail($an, $betreff, $text, $ok = '', $error = '') {
|
||||
}
|
||||
}
|
||||
|
||||
function send_html_mail($an, $betreff, $text, $ok = '', $error = '') {
|
||||
function send_html_mail(string $an, string $betreff, string $text, string $ok = '', string $error = ''): void {
|
||||
global $absender;
|
||||
$sender = 'noreply@troy-grunt.de';
|
||||
if(isset($absender) && $absender) {
|
||||
@@ -57,7 +59,7 @@ function send_html_mail($an, $betreff, $text, $ok = '', $error = '') {
|
||||
}
|
||||
}
|
||||
|
||||
function send_php_mail($an, $betreff, $text, $ok = '', $error = '') {
|
||||
function send_php_mail(string $an, string $betreff, string $text, string $ok = '', string $error = ''): void {
|
||||
global $_sendermail;
|
||||
$sender = 'noreply@troy-grunt.de';
|
||||
if (isset ( $_sendermail )) {
|
||||
@@ -78,4 +80,4 @@ function send_php_mail($an, $betreff, $text, $ok = '', $error = '') {
|
||||
echo 'Message sent!';
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user