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

Port Extra Hour DAO to use PDO #575

Merged
merged 8 commits into from
Apr 19, 2022
Merged

Port Extra Hour DAO to use PDO #575

merged 8 commits into from
Apr 19, 2022

Conversation

jaragunde
Copy link
Member

Part of #513, also includes a patch for #431 and removes unused code.

The VO had to be modified for PDO::FETCH_ALL to work properly:
* The $userId property had to match the name in the DB.
* The $date property was being set as a string from the originally
  stored value. We override the __set() magic method to take care of
  the conversion into a DateTime object.
It's not needed after we migrate all the getters to use PDO.
We also remove unnecessary checks for the row id in update and
delete operations.
Fixes:
* Undefined index: sid
* Undefined variable: string
@jaragunde jaragunde requested a review from anarute April 7, 2022 13:39
Copy link
Member

@anarute anarute left a comment

Choose a reason for hiding this comment

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

Tested locally and everything seems fine :)

@jaragunde jaragunde merged commit 0faa34d into main Apr 19, 2022
This was referenced Apr 19, 2022
@jaragunde jaragunde deleted the pdo-extra-hour branch April 19, 2022 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants