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.
Patch attached
Comment | File | Size | Author |
---|---|---|---|
#3 | httprl-1420472-3-d7-uses-drupal_exit.patch | 805 bytes | mikeytown2 |
#1 | Use_drupal_exit_to_exit.patch | 759 bytes | hass |
Comments
Comment #1
hass CreditAttribution: hass commentedd.o form preview bug
Comment #2
mikeytown2 CreditAttribution: mikeytown2 commentedcommitted to 7.x
Comment #3
mikeytown2 CreditAttribution: mikeytown2 commentedThis patch has been applied to 6.x & 7.x
Comment #4
hass CreditAttribution: hass commentedWhy are you cluttering the code with useless version stuff? This is very bad practice.
Comment #5
mikeytown2 CreditAttribution: mikeytown2 commentedDrush does this as well. Keeps my code the same as there are only a couple of small differences between 6.x and 7.x. Having 6.x and 7.x interchangeable for the most part makes my life a lot easier.
Comment #6
hass CreditAttribution: hass commentedIn Drupal we break with backward compatibility with every major release. This is done for code cleanup and many other reasons. I understand your reasons, but it's bad practice... Never seen it anywhere... Doing substr in many places costs time and is fairly useless, as it's D7 and we do not need to maintain backwards compatibility. We are only looking forward and D6 may no longer maintained aka receive no new features soon... :-)
Comment #7
mikeytown2 CreditAttribution: mikeytown2 commentedhttp://drupal.org/project/drush does this. The concepts behind HTTRPL are fairly low level, the code *could* stand on its own as it only uses a couple of things from Drupal. It is not your typical Drupal Module. The places where the code differs between 6.x and 7.x are only in a couple of places; and only because it is using Drupal API Calls.
As for performance I did a Xdebug/CacheGrind of one of my sites and it takes a total of 0.2ms to run substr() 1,511 times. In short I'm not worried about performance when using this coding pattern.