Undefined array key 2 in Drupal\easy_breadcrumb\TitleResolver->getTitle() (line 82 of modules/contrib/easy_breadcrumb/src/TitleResolver.php).

CommentFileSizeAuthor
#3 easy_breadcrumb-3435864.patch780 bytesabhishek_gupta1
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

vinodhinisureshbabu created an issue. See original summary.

vinodhinisureshbabu’s picture

Title: Undefined array key 2 in Drupal\easy_breadcrumb\TitleResolver->getTitle() (line 82 of modules/contrib/easy_breadcrumb/src/TitleResolver.php) » Undefined array key 2 in Drupal\easy_breadcrumb\TitleResolver->getTitle() (line 76 of modules/contrib/easy_breadcrumb/src/TitleResolver.php)
abhishek_gupta1’s picture

Assigned: vinodhinisureshbabu » Unassigned
Status: Active » Needs review
StatusFileSize
new780 bytes

fixed the issue and please review the patch once.

greg boggs’s picture

Issue summary: View changes

Thanks for the fix. Generally, we use array_key_exists to check to see if the key exists.

Also, please open merge requests and not patches for code you want to include.

greg boggs’s picture

Issue summary: View changes
Status: Needs review » Needs work
abhishek_gupta1’s picture

Assigned: Unassigned » abhishek_gupta1

abhishek_gupta1 changed the visibility of the branch 3435864-Undefined-array-key-2 to hidden.

greg boggs’s picture

The code looks perfect! I'd merge it, but it looks like the patch file is also in the MR, and we don't want the patch file to end up in the final module.

abhishek_gupta1’s picture

Status: Needs work » Needs review

@Greg Boggs, yes by mistake patch file is uploaded. now check the new MR.

abhishek_gupta1’s picture

Assigned: abhishek_gupta1 » Unassigned
rollins’s picture

@Greg Boggs, maybe better to have one commit for this with better descriptions, what do you think?
I do not think that ‘fix the issue’ and ‘Removed patch file’ are good commit names for merging

spuky’s picture

lets wait for 3415146 the try catch in there should fix the warning if not the merge request will need to be addapted to the changes there.

spuky’s picture

Status: Needs review » Needs work

Setting to needs work please check if the problem still exists if yes we need an updated merge request.

samit.310@gmail.com made their first commit to this issue’s fork.

samitk’s picture

Status: Needs work » Needs review

spuky’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.