Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
link.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 Jun 2015 at 09:48 UTC
Updated:
5 Jul 2015 at 00:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
jibranNice found one more issue.
Comment #4
larowlanComment #5
larowlanManually tested too
Screenshot https://www.dropbox.com/s/2y5y35qeihx32kv/Screenshot%202015-06-10%2007.4...
Comment #6
alexpottWhy is this change necessary - isn't uri the main property?
Comment #7
jibranHow about now?
Comment #8
larowlanback again
Comment #11
jibranComment #12
alexpottI'm not sure that the
!is_string($values)is actually necessary. If it is a string$values['options'] will be set.Comment #13
tstoeckler@alexpott: So you are proposing to rely on PHP's behavior that
$foo = 'abc'; isset($foo['bar']);returns TRUE? I have to strongly disagree, I think it makes the code wildly less readable. When you readisset($foo['bar'])no one would expect$footo be a string. I'm fine with changing the!isset()tois_array()if people prefer that, but...Marking "needs review" to get some more opinions on this.
Comment #14
larowlanAgree with @tstoeckler
Comment #15
jibranThanks for the suggestion @alexpott and @tstoeckler. Thank you @larowlan for helping me understand the issue.
Comment #17
jibranComment #18
alexpottI think we should use $this->mainPropertyName() instead of hardcoding
'uri'here.Why add title? It's optional?
No longer necessary to check if $values['options'] is set - it will always be.
Comment #19
jibranThanks for the review @alexpott. Fixed #18 added two more test cases. Updated docs.
Comment #20
mac_weber commentedlooks good
Comment #21
alexpottCommitted e5d87b1 and pushed to 8.0.x. Thanks!
Removed unnecessary empty line on commit.
Comment #23
jibranThanks @alexpott for the commit. Thanks @Mac_Weber for RTBC.