Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Strict standards error in PHP 5.4+ on function declarations #30

Closed
kurt-hectic opened this issue Jun 4, 2014 · 3 comments
Closed

Strict standards error in PHP 5.4+ on function declarations #30

kurt-hectic opened this issue Jun 4, 2014 · 3 comments
Assignees

Comments

@kurt-hectic
Copy link

tilserver-php fails with > PHP 5.4 due to three functions not having the expected signatures.

The following patch seems to fix it.

568c568
<   public function getUTFGrid() {

---
>   public function getUTFGrid($tileset, $z, $y, $x, $flip = true) {
1085c1085,1086
<   public function getTile() {

---
>   public function getTile(  $tileset, $z, $y, $x, $flip = true)
>   {
1214c1215
<   public function getTile() {

---
>   public function getTile($tileset, $z, $y, $x, $ext) {

@klokan
Copy link
Member

klokan commented Jun 5, 2014

I though we have tested a web hosting with PHP 5.4 before.

Could you please post more details about the problem itself?
You solution may be fine, but what is the error message you are getting?

@kurt-hectic
Copy link
Author

PHP 5.4.16 on windowx XP (wamp) gives me the following

Strict standards: Declaration of Json::getUTFGrid() should be compatible with Server::getUTFGrid($tileset, $z, $y, $x, $flip = true) in ..tileserver.php on line <i>572</i>
Strict standards: Declaration of Wmts::getTile() should be compatible with Server::getTile($tileset, $z, $y, $x, $ext) in ..tileserver.php on line <i>1100
Strict standards: Declaration of Tms::getTile() should be compatible with Server::getTile($tileset, $z, $y, $x, $ext) in ..tileserver.php on line <i>1218</i>

@klokan klokan changed the title > PHP 5.4 compatibility for function signatures Strict standards error in PHP 5.4+ on function declarations Jun 5, 2014
@daliborjanak
Copy link
Collaborator

It depends on error level which you have set on server. You can use in php error_reporting(E_ALL ^ E_STRICT); for distable this reporting in php.ini. I Fix this problem now in tileserver's code (8170e02). You can download new version from master branch an test it. Thanks for report.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants