MODx Bug/Feature Tracker and Feature Requests
Welcome to the MODx CMS Tracker. Please choose the appropriate project from the drop down menu and provide as much information as possible regarding your server environment and browser. Thanks!
FS#732 — @EVAL not working with multi-line scripts
Attached to Project —
MODx
Opened by Jason Coward (opengeek) - Wednesday, 27 December 2006, 12:15PM
Last edited by Jason Coward (opengeek) - Saturday, 30 December 2006, 09:05PM
Opened by Jason Coward (opengeek) - Wednesday, 27 December 2006, 12:15PM
Last edited by Jason Coward (opengeek) - Saturday, 30 December 2006, 09:05PM
| Task Type | Bug Report |
|---|---|
| Category | Core Distribution |
| Status | Closed |
| Assigned To |
Jason Coward (opengeek) |
| Operating System | All |
| Severity | Critical |
|---|---|
| Priority | Immediate |
| Reported Version | 0.9.5 |
| Due in Version | 0.9.6 |
| Due Date | Undecided |
| Percent Complete |
|
Details
The regexp introduced with 0.9.5 into the code responsible for parsing TV command bindings will only work with PHP scripts that fit on the same line as the @EVAL command. All other lines are truncated from the script and thus are never evaluated.
This task depends upon
This task blocks these from closing
- Field changed: Percent Complete (0% → 100%)
This is fixed in the 095dev branch and will be merged to trunk for the 0.9.5.1 release.What you and I are looking for is the 's' modifier, which makes the '.' metacharacter include the \n as well (which it doesn't by default).
$regexp= '/@(' . implode('|', $BINDINGS) . ')\s*(.*)/is';
Works for me!
Greetings, JW