Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Fehler bei Gebäuden #328

Closed
mcules opened this issue Oct 4, 2017 · 7 comments
Closed

Fehler bei Gebäuden #328

mcules opened this issue Oct 4, 2017 · 7 comments

Comments

@mcules
Copy link

mcules commented Oct 4, 2017

Hi zusammen,
ich habe ein Gebäude aus der Schleife gelöscht und bekommen nun folgenden Fehler:

Message: DateTime::setTimestamp() expects parameter 1 to be integer, float given
File: /includes/GeneralFunctions.php
Line: 143
URL: https://www.domain.de/game.php?page=buildings
PHP-Version: 7.0.16-1~dotdeb+8.1
PHP-API: cgi-fcgi
2Moons Version: 1.8.git
Debug Backtrace:
#0 [internal function]: errorHandler(2, 'DateTime::setTi...', 'FILEPATH ...', 143, Array)
#1 /includes/GeneralFunctions.php(143): DateTime->setTimestamp(6.2544273027261E+173)
#2 /includes/pages/game/ShowBuildingsPage.class.php(231): _date('U', 6.2544273027261E+173, 'Europe/Berlin')
#3 /includes/pages/game/ShowBuildingsPage.class.php(271): ShowBuildingsPage->getQueueData()
#4 /game.php(57): ShowBuildingsPage->show()
#5 {main}

@Jbaukens
Copy link
Contributor

Can we have the code of that line ?
File: /includes/GeneralFunctions.php
Line: 143

@lilmnm-kamikaze-
Copy link

Why is setTimestamp() trying to set a time stamp of "6.2544273027261E+173"? that number is not a valid unix timestamp that function uses.

its starting from this line ShowBuildingsPage.class.php and thats called from line 272 in the same file as you can see in the backtrace and this line in GeneralFunctions.php does not like the invalid timestamp

a valid time stamp would be "1504016378"

@mcules
Copy link
Author

mcules commented Oct 26, 2017

Good Question, source isn't modified. I only deleted a running building process in the gui.
Nothing in DB nor source changed.

@Lugon89
Copy link

Lugon89 commented Nov 5, 2017

I got the same problem.

Message: DateTime::setTimestamp() expects parameter 1 to be integer, float given
File: /includes/GeneralFunctions.php
Line: 143
URL: https://www.lugon.de/space/uni2/game.php?page=buildings
PHP-Version: 7.1.11-1+020171027135525.10+stretch1.gbp2e638d
PHP-API: cgi-fcgi
2Moons Version: 1.8.git
Debug Backtrace:
#0 [internal function]: errorHandler(2, 'DateTime::setTi...', 'FILEPATH ...', 143, Array)
#1 /includes/GeneralFunctions.php(143): DateTime->setTimestamp(5.1721724504224E+53)
#2 /includes/pages/game/ShowBuildingsPage.class.php(231): _date('U', 5.1721724504224E+53, 'Europe/London')
#3 /includes/pages/game/ShowBuildingsPage.class.php(271): ShowBuildingsPage->getQueueData()
#4 /game.php(57): ShowBuildingsPage->show()
#5 {main}

@jkroepke
Copy link
Owner

jkroepke commented Nov 6, 2017

@Lugon89 How to reproduce?

@mcules
Copy link
Author

mcules commented Nov 10, 2017

Just delete an building out the build queue ;)

@jkroepke
Copy link
Owner

jkroepke commented Nov 10, 2017

Okay. I do follow steps:

  • Build metalmine 1

  • build crystalmine 1

  • delete metalmine 1

OR

  • delete crystalmine1

work fine without the error.

Its unable to reproduce for me. With you steps.

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

No branches or pull requests

5 participants