Skip to content

Conversation

@nworr
Copy link
Contributor

@nworr nworr commented Sep 30, 2025

Old qgs file ( < 3.10 i assume) does'nt contain saveDateTime in the xml project tag leading to a fatal error (see #6085)

the pr add default value (empty string) if value is null
add also mini refacto

Ticket : #6085

Funded by 3liz

@github-actions github-actions bot added this to the 3.11.0 milestone Sep 30, 2025
@nworr nworr changed the title feat : use null coalescing operator to ensure type Provide default values for *very* old qgs files with missing attributes Oct 3, 2025
@nworr nworr marked this pull request as ready for review October 3, 2025 13:38
Copy link
Collaborator

@rldhont rldhont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update Qgis\ProjectInfo instead ?

Copy link
Collaborator

@rldhont rldhont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the ProjectInfo docstring ?

 * @property null|string                               $saveDateTime
 * @property null|string                               $saveUser
 * @property null|string                               $saveUserFull

and the Qgis\ProjectProperties

@rldhont rldhont added the php Pull requests that update Php code label Oct 6, 2025
@rldhont
Copy link
Collaborator

rldhont commented Oct 6, 2025

Can you also add a test in tests/units/classes/Project/Qgis/ProjectInfoTest.php with tests/units/classes/Project/Ressources/WMSInfotest.qgs ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants