User tests: Successful: Unsuccessful:
Pull Request for issue #17126.
Some code.
Instructions, see issue #17126
Warning + textboxes are NOT empty.
All textboxes are empty, so the user has to fill in AGAIN all textboxes.
No.
Category | ⇒ | Front End com_contact |
Status | New | ⇒ | Pending |
Ask for input.
Is the following code nessecary?
empty($item->catid)
In the DB table xxx_content is defined:
`catid` int(10) UNSIGNED NOT NULL DEFAULT '0'
So the catid may not be empty !?
The patch works fine for me.
Is the following code nessecary?
There is never a problem with extra test :-). However in this situation only !empty($item->catid)
is enough. !isset($item->catid)
will only check if the $item
object has a 'catid' property. !empty($item->catid)
will check if the $item
object has a 'catid' property, and this property is not empty. See this post for more information:
https://stackoverflow.com/questions/7191626/isset-and-empty-what-to-use#answer-7191642
If you change this I can conform the test via the J!Issue tracker.
Thanks, interesting post.
Do you mean!empty($item->catid)
or empty($item->catid)
is enough? Because catid is not empty.
The function $app->setUserState(..)
may not be executed in this situation!
Labels |
Added:
?
|
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-09-01 08:50:58 |
Closed_By | ⇒ | sandewt |
Sorry, a mistake for closing!!
Status | Closed | ⇒ | New |
Closed_Date | 2017-09-01 08:50:58 | ⇒ | |
Closed_By | sandewt | ⇒ |
Status | New | ⇒ | Pending |
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC after two successful tests.
@franz-wohlkoenig Please see @n9iels #17743 (comment)
@sandewt Can you address this #17743 (comment)?
@franz-wohlkoenig Let's leve desicion to one of maainterners. Code my to be a little simpler, but both versions works.
Labels |
Added:
?
|
On closer inspection and the comments, the following:
In the Joomla! core rarely used the combination of 'isset and empty', and not for no reason.
So I choise for the proposal of @niels that one test is enough.
I expect a string for $item->catid (gettype) which is p.e. '16'. And not '' or '0'.
So I prefer 'empty' in stead of '!isset' if the user state ($app->setUserState) is not yet set.
See also: http://php.net/manual/en/types.comparisons.php
So I changed the code, PLEASE TEST AGAIN.
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-10-09 11:08:39 |
Closed_By | ⇒ | sandewt |
Sorry for closing, issue should be open @franz-wohlkoenig.
re-opened
Status | Closed | ⇒ | New |
Closed_Date | 2017-10-09 11:08:39 | ⇒ | |
Closed_By | sandewt | ⇒ | |
Labels |
Removed:
?
|
Status | New | ⇒ | Pending |
Thanks Brian, and @niels should be @n9iels.
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-01-08 17:18:44 |
Closed_By | ⇒ | mbabker | |
Labels |
Added:
?
|
@sandewt
Please look at #20195 (comment)
I'm new on Github.
If I have downloaded the code and look to the characters.
So I see in my editer, that after the "{" and the "}" braces (accolades) is a tab. In line 76 and 78. (NOK.)
How can I avoid this in github by making a PR?
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17743.