Magst du mein Test-System auf PHP 8 anheben? Im Live-System ist PHP 8.0.13 aktiv.
Hab ich mal gemacht
Magst du mein Test-System auf PHP 8 anheben? Im Live-System ist PHP 8.0.13 aktiv.
Hab ich mal gemacht
Oh, ich verwende da einen Syntax der erst ab PHP8.0 verfügbar ist.
Solltest du(oder auch andere) eine niedrigere PHP Version wenden, müsste die Datei news/lib/form/TNewsForm.class.php wie folgt geändert werden
protected function initAttachmentHandler() {
// get attachments
if ($this->isMultilingual) {
if (MODULE_ATTACHMENT) {
foreach ($this->availableContentLanguages as $key => $value) {
$this->attachmentHandler[$key] = new ($this->getAttachmentHandler())($key, $this->attachmentObjectType, $this->attachmentObjectID, $this->tmpHash[$key], $this->attachmentParentObjectID);
}
}
}
else {
if (MODULE_ATTACHMENT) {
$this->attachmentHandler = new ($this->getAttachmentHandler())(0, $this->attachmentObjectType, $this->attachmentObjectID, $this->tmpHash, $this->attachmentParentObjectID);
}
}
}
Alles anzeigen
Durch das hier ersetzt werden
protected function initAttachmentHandler() {
// get attachments
if ($this->isMultilingual) {
if (MODULE_ATTACHMENT) {
$className = $this->getAttachmentHandler();
foreach ($this->availableContentLanguages as $key => $value) {
$this->attachmentHandler[$key] = new $className($key, $this->attachmentObjectType, $this->attachmentObjectID, $this->tmpHash[$key], $this->attachmentParentObjectID);
}
}
}
else {
if (MODULE_ATTACHMENT) {
$className = $this->getAttachmentHandler();
$this->attachmentHandler = new $className(0, $this->attachmentObjectType, $this->attachmentObjectID, $this->tmpHash, $this->attachmentParentObjectID);
}
}
}
Alles anzeigen