- Issue created by @dxvargas
- Merge request !128Issue #3480219: Silence PHP warning when the field subject is disabled. โ (Merged) created by dxvargas
- ๐ต๐นPortugal dxvargas
I've created a MR.
PS: I'm (not so) sorry to use the "@", I think no one likes it except me. I think here it's the shortest and cleanest fix. Feel free to add the much more consensual "?? NULL" instead, that's just about the same AFAIK :)
- ๐ต๐นPortugal dxvargas
I've created a MR.
PS: I'm (not so) sorry to use the "@", I think no one likes it except me. I think here it's the shortest and cleanest fix. Feel free to add the much more consensual "?? NULL" instead, that's just about the same AFAIK :)
- ๐ต๐ฑPoland alorenc Wolsztyn, ๐ต๐ฑ
I think we should not even set the variable is such case
`
// The field subject can be disabled.
if (isset($form_copy['subject'])) {
$form['subject'] = $form_copy['subject'];
}
` - First commit to issue fork.
- ๐ฎ๐ณIndia zaryab_drupal Bhopal
Updated code with this below :
if (isset($form_copy['subject'])) { $form['subject'] = $form_copy['subject']; }
The use of the @ symbol in PHP is generally discouraged because it suppresses errors, which can make debugging difficult. Instead, we should use proper checks like isset() or empty() to safely handle variables.
- ๐ต๐ฑPoland alorenc Wolsztyn, ๐ต๐ฑ
MR contains many not-related changes. Yes, some parts are valid, but we should stick to a specific issue.
- ๐ต๐นPortugal dxvargas
I agree @zaryab_drupal, like this is better.
There are failing tests which are not related with this MR (I see them also in main branch).
I mark the issue as RTBC. - ๐ท๐ดRomania claudiu.cristea Arad ๐ท๐ด
claudiu.cristea โ made their first commit to this issueโs fork.
-
claudiu.cristea โ
committed 486dd362 on 3.0.x authored by
dxvargas โ
Issue #3480219 by zaryab_drupal, dxvargas, claudiu.cristea, alorenc:...
-
claudiu.cristea โ
committed 486dd362 on 3.0.x authored by
dxvargas โ
Automatically closed - issue fixed for 2 weeks with no activity.