? ? Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
5 Jun 2020

Staging pull request for issue #27214, basically a backport of #27493.

Summary of Changes

When comparing two versions of an article a warning is thrown:

Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead

This pr fixes it.

Testing Instructions

  • Ensure versions is enabled in the articles options in the editing layout tab
  • Create an article
  • Edit the title and save the article again
  • Edit the title again and save it
  • Click on the versions button
  • Select the two versions
  • Click on compare

Expected result

No warning is thrown.

Actual result

A warning is thrown.

avatar laoneo laoneo - open - 5 Jun 2020
avatar laoneo laoneo - change - 5 Jun 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 Jun 2020
Category Administration com_content com_contenthistory
avatar laoneo laoneo - change - 5 Jun 2020
Labels Added: ?
avatar laoneo laoneo - change - 5 Jun 2020
The description was changed
avatar laoneo laoneo - edited - 5 Jun 2020
avatar laoneo laoneo - change - 5 Jun 2020
The description was changed
avatar laoneo laoneo - edited - 5 Jun 2020
avatar bonzani bonzani - test_item - 7 Jun 2020 - Tested successfully
avatar bonzani
bonzani - comment - 7 Jun 2020

I have tested this item successfully on 8b4f0b5


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

avatar alikon alikon - test_item - 7 Jun 2020 - Tested successfully
avatar alikon
alikon - comment - 7 Jun 2020

I have tested this item successfully on 8b4f0b5


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

avatar alikon alikon - change - 7 Jun 2020
Status Pending Ready to Commit
avatar alikon
alikon - comment - 7 Jun 2020

rtc


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

avatar HLeithner
HLeithner - comment - 7 Jun 2020

Thanks!

I saw your second commit changing isset to property_exists since it's a backport it's not applicable so only a notice for others. Using isset is faster because it's a language construct and not a function call beside that it wouldn't throw a notice if $object->data is not defined.

avatar HLeithner HLeithner - change - 7 Jun 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-06-07 08:30:11
Closed_By HLeithner
Labels Added: ?
avatar HLeithner HLeithner - close - 7 Jun 2020
avatar HLeithner HLeithner - merge - 7 Jun 2020
avatar laoneo
laoneo - comment - 7 Jun 2020

I'v changed it to be more inline with the J4 pr, so @wilsonge will have less trouble merging it up.

avatar wilsonge
wilsonge - comment - 7 Jun 2020

Thankyou <3 !!

Add a Comment

Login with GitHub to post a comment