Skip to content

PHP Notice: Undefined variable $data#10985

Merged
wilsonge merged 1 commit intojoomla:stagingfrom
demis-palma:fix-logout
Jul 3, 2016
Merged

PHP Notice: Undefined variable $data#10985
wilsonge merged 1 commit intojoomla:stagingfrom
demis-palma:fix-logout

Conversation

@demis-palma
Copy link
Copy Markdown
Contributor

@demis-palma demis-palma commented Jul 1, 2016

PHP Notice: Undefined variable: data in [...]/components/com_users/controllers/user.php on line 207.

Testing Instructions

  1. Login into the front-end using the component, or the module as you prefer.
    URL if you want to use the component:
    http://localhost/index.php?option=com_users&view=login
  2. Logout by the front-end using the component, or the module as you prefer.
    If you want to use the component again, call the URL:
    http://localhost/index.php?option=com_users&view=login and press "logout".
  3. Check the error log of your web-server for the PHP notice mentioned above.

Summary of Changes

The variable $data does not exist. The piece of code that refers to $data has been clearly copied and pasted by the login() method about 120 lines above, but the context of logout() method is slightly different, and does not provide the variable $data as the login() actually does.

Rewritten the related code accordingly.

@demis-palma
Copy link
Copy Markdown
Contributor Author

Another side effect solved by this patch, is that the check that prevents from using external return URLs did not work, of course, as it relied on a variable that didn't exist ($data).

Now the check that prevents from using external return URLs has been restored.

@brianteeman
Copy link
Copy Markdown
Contributor

I have tested this item ✅ successfully on 0112da7

Confirmed issue and confirmed fix


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10985.

@andrepereiradasilva
Copy link
Copy Markdown
Contributor

I have tested this item ✅ successfully on 0112da7

works as described.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10985.

@brianteeman
Copy link
Copy Markdown
Contributor

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10985.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jul 2, 2016
@infograf768
Copy link
Copy Markdown
Member

I guess this has to go into 3.6.0 next RC

@brianteeman brianteeman added this to the Joomla 3.6.0 milestone Jul 2, 2016
@zero-24
Copy link
Copy Markdown
Contributor

zero-24 commented Jul 2, 2016

@wilsonge FYI ;)

@wilsonge wilsonge merged commit 769cef9 into joomla:staging Jul 3, 2016
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jul 3, 2016
wilsonge pushed a commit to wilsonge/joomla-cms that referenced this pull request Jul 4, 2016
@infograf768
Copy link
Copy Markdown
Member

This has tottaly broken logout redirection... I should have tested...

@infograf768
Copy link
Copy Markdown
Member

Please test
#11093

@demis-palma demis-palma deleted the fix-logout branch July 29, 2016 21:42
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.

7 participants