Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#33468] Fixes typo in getter and setter of form fields. #3306

Closed
wants to merge 1 commit into from

Conversation

Achal-Aggarwal
Copy link
Contributor

@Achal-Aggarwal
Copy link
Contributor Author

#3304

case 'inputmode':
$this->name = (string) $value;
$this->$name = (string) $value;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess you should make this inputmode - as you have for the other 1 instance cases

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not one instance case. 'dirname' is getting assigned through it. But now I am thinking to change it little bit.

@vdespa
Copy link

vdespa commented Mar 15, 2014

I don't quite see what this PR fixes, as there are no issues with the code.

@Achal-Aggarwal
Copy link
Contributor Author

@vdespa Following are the lines in which either $ is before name ($this->name) or is present before protected property ($this->$accept).

  1. https://github.com/joomla/joomla-cms/pull/3306/files#diff-dec67eea53cfde023707fca26cc69a58L74
  2. https://github.com/joomla/joomla-cms/pull/3306/files#diff-bad19b858a25cd6463f9c08e6c011b1aL100
  3. https://github.com/joomla/joomla-cms/pull/3306/files#diff-263feb5d955c0931bea2544b36815f7fL84 (issue reported in 33468)

https://github.com/joomla/joomla-cms/pull/3306/files#diff-037720088ad5e312e2824e27f2cd5550L101 In this inputmode gets a string value instead of boolean.

Other changes are because there is only one property which is present in overridden set & get. So I thought to not to use $name.

@vdespa
Copy link

vdespa commented Mar 15, 2014

The only issue was in JFormFieldTextarea, which already has a PR.

IMHO you are not actually fixing anything, nor are you breaking anything.

@Achal-Aggarwal
Copy link
Contributor Author

The issue Frederic noticed is same as with meter property of password and accept of file field. Try doing the same thing with these fields as described in the joomlacode tracker. Or apply this diff https://gist.github.com/Achal-Aggarwal/9563815#file-typo-password-field-test and run phpunit tests/unit/suites/libraries/joomla/form/fields/JFormFieldPasswordTest.php

@brianteeman
Copy link
Contributor

closed as per the comment on the tracker

@brianteeman brianteeman closed this Aug 8, 2014
@wilsonge
Copy link
Contributor

wilsonge commented Aug 8, 2014

@Achal-Aggarwal the password and file field bugs fixed here still exist. would you mind doing a new pr merging in master to fix please? (also as you have a unit test there would be awesome to add that in!)

@Achal-Aggarwal
Copy link
Contributor Author

@wilsonge test PR 4100.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants