Issue Details (XML | Word | Printable)

Key: MDL-19418
Type: Sub-task Sub-task
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Nicolas Connault
Reporter: Petr Skoda
Votes: 0
Watchers: 1
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle
MDL-19415

ereg* is deprecated in PHP 5.3

Created: 07/Jun/09 06:45 PM   Updated: 15/Aug/09 07:02 AM
Return to search
Component/s: General
Affects Version/s: 1.9.5
Fix Version/s: 2.0

File Attachments: 1. Text File MDL-19418.patch (64 kB)


Participants: Nicolas Connault, Petr Skoda and Pierre Pichet
Security Level: None
Resolved date: 22/Jun/09
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_20_STABLE


 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Nicolas Connault added a comment - 19/Jun/09 02:40 PM
Attached a patch with ereg -> preg replacements. Please review

Nicolas Connault added a comment - 22/Jun/09 09:26 AM
The only ereg* functions left now are in third party libraries.

Pierre Pichet added a comment - 15/Aug/09 07:02 AM
There is a problem in calculated/questiontype.php
Warning: preg_match() [function.preg-match]: Unknown modifier '<' in C:\moodle\moodle\site\moodle_head\question\type\calculated\questiontype.php on line 1899

This 1899 line explore the math formula.
$safeoperatorchar = '-+/%>:^~<?=&|!'; / */
$operatorornumber = "[$safeoperatorchar.0-9eE]";

while (preg_match("(^|[$safeoperatorchar,(])([a-z0-9_]*)\\(($operatorornumber+(,$operatorornumber+((,$operatorornumber+)+)?)?)?
)
",
$formula, $regs)) {