Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Undefined variable in the file block.api.php
Comment | File | Size | Author |
---|---|---|---|
#14 | block-api-php-undefined-2934527-14.patch | 577 bytes | msankhala |
#9 | evidence_01.png | 96.38 KB | emartoni |
#2 | drupal_block-2934527-2.patch | 566 bytes | pifagor |
Screenshot from 2018-01-05 01:51:11.png | 265.23 KB | pifagor |
Comments
Comment #2
pifagorI created patch
Comment #3
pifagorComment #4
pifagorComment #6
pifagorComment #7
pifagorPlease review this patch
Comment #8
cilefen CreditAttribution: cilefen as a volunteer commentedThis will attract reviewers.
Comment #9
emartoni CreditAttribution: emartoni at CI&T commentedWorked for me!
Comment #10
cilefen CreditAttribution: cilefen as a volunteer commentedComment #11
Gábor HojtsyHm, is this firing some warning in your IDE without the patch?
I mean it is not a better code example this way either :) If you copy this code, it will run fine but why have the condition in the first place in this setup?
Should we add a fake call to some fake service so it looks more logical? (Would that not fire a warning in your IDE?)
Comment #12
Anonymous (not verified) CreditAttribution: Anonymous commented#11: good suggestion! Something like this:
Edit: Wow. I see 'View changes' tag was added to this post. And IS was updated (new image). But this is not my merit. I have 0 attached files. Looks like @emartoni added this image and updated IS.. via me! David Blaine?
Comment #13
msankhala CreditAttribution: msankhala as a volunteer and at Srijan | A Material+ Company commentedMoving this to NW because of suggestion in #12.
Comment #14
msankhala CreditAttribution: msankhala as a volunteer and at Srijan | A Material+ Company commentedHere is updated patch.
Comment #15
Anonymous (not verified) CreditAttribution: Anonymous commentedThank you, @msankhala! #12 is relevant to #11. So, all feedbacks have been addressed.
Comment #16
alexpottImproving the title.
Comment #17
alexpottCrediting @Gábor Hojtsy for the review that influenced the direction of the patch.
Comment #18
alexpottCommitted and pushed 13ef6d3dce to 8.6.x and 0eaf3c7982 to 8.5.x. Thanks!
Backported to 8.5.x as a docs only fix.
Comment #21
lokapujyawould the label really be 'some condition'. Wouldn't the label just be 'some text' or some made up name?
Comment #22
alexpott@lokapujya does it matter?
Comment #23
lokapujyaThe best practice would have been to get a new animal name into Core. It is just a missed opportunity. - haha
Comment #24
msankhala CreditAttribution: msankhala as a volunteer and at Srijan | A Material+ Company commentedI think this should not make much difference because this is just an example code. One must modify code before using it in actual module.
Comment #25
Anonymous (not verified) CreditAttribution: Anonymous commented#23: On the contrary, now it became opportunity to give the animal a unique name ;)