Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal error when saving modul input or output #368

Closed
markushuebner opened this issue Mar 1, 2023 · 3 comments · Fixed by #369
Closed

fatal error when saving modul input or output #368

markushuebner opened this issue Mar 1, 2023 · 3 comments · Fixed by #369
Assignees
Labels
bug Something isn't working
Milestone

Comments

@markushuebner
Copy link

PHP 8.0.27
Contenido DEV-Version 28.02.2023
local development within xampp

When saving changes within module input or output, there only appears a blanc frame afterwards. Errorlog reports on this:

PHP Fatal error:  Uncaught TypeError: Unsupported operand types: string + int in C:\xampp\htdocs\contenido\classes\version\class.version.php:467
Stack trace:
#0 C:\xampp\htdocs\contenido\classes\version\class.version.php(350): cVersion->getRevision()
#1 C:\xampp\htdocs\contenido\includes\functions.mod.php(64): cVersion->createNewVersion()
#2 C:\xampp\htdocs\contenido\includes\type\action\include.mod_edit.action.php(47): modEditModule('5', 'content_header_...', '', '', '<?php\r\n\r\n/**\r\n ...', '', 'content')
#3 C:\xampp\htdocs\contenido\main.php(200): include_once('C:\\xampp\\htdocs...')
#4 {main}
  thrown in C:\xampp\htdocs\contenido\classes\version\class.version.php on line 467

This problem can be solved via changing line 467
from
$this->iVersion = ($this->iRevisionNumber + 1) . '_' . $this->dActualTimestamp;
to
$this->iVersion = (intval($this->iRevisionNumber) + 1) . '_' . $this->dActualTimestamp;

@muratpurc muratpurc self-assigned this Mar 1, 2023
@muratpurc muratpurc added the bug Something isn't working label Mar 1, 2023
@muratpurc muratpurc added this to To do in Kanban board via automation Mar 1, 2023
@muratpurc muratpurc added this to the v4.10.2 milestone Mar 1, 2023
muratpurc added a commit that referenced this issue Mar 1, 2023
Ensure to set the revision number as int type.
@muratpurc
Copy link
Collaborator

Thank you for the report, it has been fixed.

@muratpurc muratpurc linked a pull request Mar 1, 2023 that will close this issue
muratpurc added a commit that referenced this issue Mar 1, 2023
…g-modul-input-or-output

#368 fatal error when saving module input or output.
Kanban board automation moved this from To do to Done Mar 1, 2023
@markushuebner
Copy link
Author

That was lightning fast, Murat! :)

@muratpurc
Copy link
Collaborator

I had the project open in front of me anyway and this was a low hanging fruit. Thanks again for reporting, Markus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Kanban board
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants