Skip to content

Loading…

DateTime::createFromFormat() bug when editing posts #85

Closed
royboy789 opened this Issue · 3 comments

3 participants

@royboy789

Sorry been a while since I've had motivation to come back to working on my project, and help expand anywhere I can with this awesome plugin.

I recently did a full update of my code including merging all new aspects of your plugin with my outdated one. However I'm noticing a new error come up. Even though I pull from /posts and then edit using the same pulled object (editing title or content only) I am getting these errors on return:

Warning:
DateTime::createFromFormat() expects parameter 3 to be DateTimeZone, integer given in .. / lib / class - wp - json - datetime.php on line 16

Error:
Call to a member function setTimezone() on a non-object in .. / lib / class - wp - json - server.php on line 718

any ideas?

@rachelbaker rachelbaker added the Bug label
@rachelbaker rachelbaker added this to the 0.9 milestone
@rachelbaker rachelbaker self-assigned this
@rachelbaker
WordPress REST API Team member

It looks like this was caused by SHA: d7e732f

@rachelbaker rachelbaker removed their assignment
@rachelbaker rachelbaker self-assigned this
@rachelbaker rachelbaker pushed a commit that referenced this issue
Rachel Baker #85 - added timezone parameter to WP_JSON_DateTime::createFromFormat(…
…) in parse_date method.
959dfac
@rachelbaker
WordPress REST API Team member

@rmccue I have tested the code in my pull request, but can you double-check my work when you have a chance?

@rachelbaker rachelbaker removed their assignment
@rmccue rmccue was assigned by rachelbaker
@rmccue rmccue closed this
@rmccue
WordPress REST API Team member

Should be fixed now. Thanks for the report, and patch! :cactus:

@rmccue rmccue reopened this
@rmccue rmccue closed this
@kellbot kellbot pushed a commit to kellbot/WP-API that referenced this issue
Rachel Baker #85 - added timezone parameter to WP_JSON_DateTime::createFromFormat(…
…) in parse_date method.
843bfd3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.