Ticket #845 (closed Bug: fixed)
PHP 5.3 generates slew of errors
| Reported by: | craigmj | Owned by: | vipsoft |
|---|---|---|---|
| Priority: | critical | Milestone: | Piwik 0.4.3 |
| Component: | Core | Keywords: | |
| Cc: | Sensitive: |
Description
Under PHP 5.3 the ereg() method has been deprecated, and a number of other features are changed.
The attached diff allows Piwik to install and run under 5.3. It primarily fixes the deprecated issues in the code, BUT NOT in the Unit Tests: these currently generate a range of warnings about depracation.
Therefore this diff is a starting point, and SHOULD BE CHECKED since in some places it is not immediately obvious that the ereg -> preg replacement is trivial.
In theory, the diff is backwards-compatible, but I've only tested under 5.3, so am unsure about this.
Note too that I've not changed the ereg calls in
libs/PclZip/pclzip.lib.php libs/UserAgentParser/UserAgentParser.php
Since these are libraries, I have left them, and they don't appear to cause a problem on my instance yet (which I've only just installed and started playing with).

