dle-modules / DLE-UniForm

Универсальные формы обратной связи для DataLife Engine
http://pafnuty.name/modules/159-uniform.html
MIT License
22 stars 12 forks source link

[BUG]Deprecated: Unparenthesized #100

Open Taylory174 opened 3 years ago

Taylory174 commented 3 years ago

Описание ошибки:

Deprecated: Unparenthesized a ? b : c ? d : e is deprecated. Use either (a ? b : c) ? d : e or a ? b : (c ? d : e) in /home/public_html/engine/modules/uniform/cfg.php on line 10

При каких условиях воспроизводится ошибка:

После отправки сообщения формы customheader и обновлении страницы

Вносились ли модификации в движок: модификации не вносились, скорей всего из за версии php

Версия DLE: dle 14.1

Версия PHP: PHP 7.4

Конфиг шаблона:

templateFolder = customheader
// nocache = y
// debug = y
required = textarea, email, phone, header
selectFields = calltime
sendmail = y
emails = talory174@gmail.com
Taylory174 commented 3 years ago

Изменил на

'formConfig' => !empty($formConfig) ? $formConfig : ((isset($_REQUEST['formConfig'])) ? $_REQUEST['formConfig'] : 'feedback'), 'role' => !empty($role) ? $role : ((isset($arConf['role'])) ? $arConf['role'] : 'feedback'), 'templateFolder' => !empty($templateFolder) ? $templateFolder : ((isset($arConf['templateFolder'])) ? $arConf['templateFolder'] : 'feedback'), 'nocache' => !empty($nocache) ? $nocache : ((isset($arConf['nocache'])) ? $arConf['nocache'] : false), 'debug' => !empty($debug) ? $debug : ((isset($arConf['debug'])) ? $arConf['debug'] : false), 'required' => !empty($required) ? $required : ((isset($arConf['required'])) ? $arConf['required'] : false), 'hidden' => !empty($hidden) ? $hidden : ((isset($arConf['hidden'])) ? $arConf['hidden'] : false), 'sendmail' => !empty($sendmail) ? $sendmail : ((isset($arConf['sendmail'])) ? $arConf['sendmail'] : false), 'emails' => !empty($emails) ? $emails : ((isset($arConf['emails'])) ? $arConf['emails'] : false), 'selectFields' => !empty($selectFields) ? $selectFields : ((isset($arConf['selectFields'])) ? $arConf['selectFields'] : false), 'checkboxFields' => !empty($checkboxFields) ? $checkboxFields : ((isset($arConf['checkboxFields'])) ? $arConf['checkboxFields'] : false), 'radioFields' => !empty($radioFields) ? $radioFields : ((isset($arConf['radioFields'])) ? $arConf['radioFields'] : false), 'sendAsPlain' => !empty($sendAsPlain) ? true : ((isset($arConf['sendAsPlain'])) ? true : false), 'sendToAuthor' => !empty($sendToAuthor) ? true : ((isset($arConf['sendToAuthor'])) ? true : false), 'sendToSender' => !empty($sendToSender) ? true : ((isset($arConf['sendToSender'])) ? true : false), 'allowAttachments' => !empty($allowAttachments) ? true : ((isset($arConf['allowAttachments'])) ? true : false), 'maxFileSize' => !empty($maxFileSize) ? $maxFileSize : ((isset($arConf['maxFileSize'])) ? $arConf['maxFileSize'] : false), 'allowedFileTypes' => !empty($allowedFileTypes) ? $allowedFileTypes : ((isset($arConf['allowedFileTypes'])) ? $arConf['allowedFileTypes'] : false), 'parseSendMail' => !empty($parseSendMail) ? $parseSendMail : ((isset($arConf['parseSendMail'])) ? $arConf['parseSendMail'] : false),

pafnuty commented 3 years ago

@Taylory174 внесу изменения при возможности.