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.
In PHP 5.5, the PREG_REPLACE function's /e switch is deprecated. Replace its use in the Oracle Driver with PREG_REPLACE_CALLBACK.
Following functions are affected:
escapeReserved
escapeAnsi
Fixing escapeAnsi is pretty easy, escapeReserved is a bit more difficult since my limited regex knowledge keeps me from fully understanding the output of the replace regexes.
[Edit - code removed because its wrong]
Comment | File | Size | Author |
---|---|---|---|
#2 | Replace preg_replace-e with preg_replace_callback-2085013-2.patch | 4.39 KB | siromega |
#1 | Replace preg_replace-e with preg_replace_callback-2085013-1.patch | 4.34 KB | siromega |
Comments
Comment #1
siromega CreditAttribution: siromega commentedHere is my patch. Was a quick port, it still needs testing (I haven't been able to get my environment correct for Drupal on PHP 5.5 on linux yet, so I cant test it).
It only works in PHP 5.3.x and above - because it uses anonymous functions it doesn't work on PHP 5.2.x. PHP 7.x supports 5.2.5+ so is this something we want to break?
Comment #2
siromega CreditAttribution: siromega commentedMinor fix for one of the regexes (finally got my instance up and running).
Comment #2.0
siromega CreditAttribution: siromega commentedRemoved incorrect code