#include "php_pq.h"
#include "php_pqexc.h"
-#include "php_pqconn_event.h"
#include "php_pq_misc.h"
+#include "php_pqconn_event.h"
#undef PHP_PQ_TYPE
#include "php_pq_type.h"
ZEND_BEGIN_ARG_INFO_EX(ai_pqdt_create_from_format, 0, 0, 2)
ZEND_ARG_INFO(0, format)
ZEND_ARG_INFO(0, datetime)
+#if PHP_VERSION_ID >= 70200
+ ZEND_ARG_OBJ_INFO(0, object, DateTimeZone, 1)
+#else
ZEND_ARG_INFO(0, timezone)
+#endif
ZEND_END_ARG_INFO();
static PHP_METHOD(pqdt, createFromFormat)
{
case '{':
return parse_array(a);
+ case '}':
+ return SUCCESS;
+
case '"':
a->quotes = 1;
++a->ptr;
static ZEND_RESULT_CODE parse_elements(ArrayParserState *a)
{
- char delims[] = {'}', PHP_PQ_DELIM_OF_ARRAY(a->typ), 0};
+ char delims[] = {'}', (char) PHP_PQ_DELIM_OF_ARRAY(a->typ), 0};
while (SUCCESS == parse_element(a, delims[1])) {
switch (caa(a, delims, 0)) {