Compare commits

...

2 Commits

Author SHA1 Message Date
Dominique FOURNIER
9f028ac798 FormField : property formTemplate must be public and not private (used by Form) 2023-05-15 08:38:04 +02:00
Dominique FOURNIER
7cbbec7f81 phpstan 2023-04-14 21:37:54 +02:00
3 changed files with 11 additions and 9 deletions

View File

@@ -90,7 +90,7 @@ class Formfield
/**
* Form template (Bootstrap3 by default)
*/
private $formTemplate = "Bootstrap3";
public $formTemplate = "Bootstrap3";
/**
* When adding a field, the name and the label are the minimum mandatory

View File

@@ -302,7 +302,7 @@ class Mail
PREG_SPLIT_DELIM_CAPTURE
);
// Remove the first 2 dashes : the boundary is stored like in the headers
$boundary = "";
$boundary = $boundaryCR = "";
while (count($boundaryArray) > 0 && substr($boundary, 0, 2) !== "--") {
// Skip the lines until the coundary is found. The boundary start by --
$boundary = array_shift($boundaryArray);
@@ -379,9 +379,9 @@ class Mail
$headersEML = ltrim(substr($content, 0, $pos +
strlen($headerBodySeparator)));
$headersArray = [];
$prevCR = "";
if ($headersEML !== "" && $headersEML !== "--") {
$prev = "";
$prevCR = "";
$headersSplit = preg_split(
"#([\r\n]+)#",
$headersEML,
@@ -527,6 +527,7 @@ class Mail
// multipart/alternative)
$sectionList = $this->sectionList();
$sectionIDtoChange = "";
$boundary = $boundaryCR = "";
foreach ($sectionList as $sectionID) {
$section = $this->sectionGet($sectionID);
if (
@@ -628,10 +629,10 @@ class Mail
"text/html; charset=$charset",
$sectionIDtoChange
);
if (isset($boundary)) {
if ($boundary !== "") {
$part["_boundary"] = $boundary;
}
if (isset($boundaryCR)) {
if ($boundaryCR != "") {
$part["_boundaryCR"] = $boundaryCR;
}
$this->sectionUpdate($sectionIDtoChange, $part);
@@ -654,6 +655,7 @@ class Mail
// multipart/alternative)
$sectionList = $this->sectionList();
$sectionIDtoChange = "";
$boundary = "";
foreach ($sectionList as $sectionID) {
$section = $this->sectionGet($sectionID);
if (
@@ -736,12 +738,9 @@ class Mail
"text/plain; charset=$charset",
$sectionIDtoChange
);
if (isset($boundary)) {
if ($boundary !== "") {
$part["_boundary"] = $boundary;
}
if (isset($boundaryCR)) {
$part["_boundaryCR"] = $boundaryCR;
}
$this->sectionUpdate($sectionIDtoChange, $part);
$this->createMailEML();
}
@@ -939,6 +938,7 @@ class Mail
);
}
// Add the new section to the mixed section
$contentID = "";
$sectionID = $this->sectionAddDefault();
$this->sectionAddChild($sectionIDMixed, $sectionID);
$finfo = new \finfo(FILEINFO_MIME);
@@ -1059,6 +1059,7 @@ class Mail
), $number), 404);
}
$part = $this->sectionGet($attachmentIDs[$number]);
$res = [];
foreach ($part as $key => $val) {
if ($key[0] === "_") {
if (

View File

@@ -228,6 +228,7 @@ class Tcpserver
pcntl_signal(SIGTERM, [$this, "sigTERMINT"]);
pcntl_signal(SIGINT, [$this, "sigTERMINT"]);
cli_set_process_title($this->processName . " main");
$sockServer = [];
foreach ($this->addresses as $key => $address) {
$port = $this->ports[$key];
if (filter_var($address, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {