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.
Some functions seems to be deprecated, therefore some dsm() have been put in order to warn if called: this code has been commited and if it runs on production, it might cause WSOD because dsm() won't exist without devel module: maybe triggering a watchdog notice or such could be better?
See ctools.module lines 681 and 689.
Comment | File | Size | Author |
---|---|---|---|
#5 | 1313382-dsm-remove-5.patch | 2.68 KB | andypost |
#3 | 1313382-dsm-change2debug-3.patch | 2.53 KB | andypost |
Comments
Comment #1
Ashlar CreditAttribution: Ashlar commentedThis bug report has not been active for six months. In an effort to clean-up the issue queue this item has been closed. If your modules are current and the report is still relevant please feel free to change the Status back to active.
Comment #2
andypostOnly a few places needs review
Comment #3
andypostComment #4
tim.plunkettWhy keep any of this? I'd say remove it completely.
Comment #5
andypostSuppose this commented out code is a thing of a past.
Suppose we need to ping someone from ctools team to carefully review, probably this clean-up could be deeper.
Comment #6
andypostcan we get this commited?
Comment #7
pounardCode that should not be called may throw logic error exception, to explicitely tell the code he did a bad mistake: finding errors right away forces the devs to fix them. I'm just sayin', I really don't know why you kept those functions in the first place, there's maybe a good reason.
Comment #8
merlinofchaos CreditAttribution: merlinofchaos commentedIt was a bad idea of me to use dsm() to point out these errors, but pounard is right -- it's better for developers to get explicit errors.
I don't remember why those functions are still there at this point. Possibly worth doing a little code archeaology to see.
Comment #9
andypostso... let's change them to trigger_error()?
Comment #10
tim.plunkettThrow named exceptions.
Comment #11
pounardDepends on how is fatal the error, but if they are, exceptions are the way to go.
Comment #12
merlinofchaos CreditAttribution: merlinofchaos commentedOkay, I went through the list. I removed the no longer needed context_cache functions. I replaced a dsm about $attributes['class'] with a correction to just make it an array. (Experience has shown that there's Always One More 'class' setting that was not updated to the array notation).
I left in the commented out dsm()s. In a way, they're a reminder of something I had intended but haven't gotten back to. Maybe someday I or someone will, and the commented code at least says something about it. Removing it guarantees nothing will ever happen there.
Committed and pushed.