php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72176 pg_insert timestamp regression
Submitted: 2016-05-09 11:58 UTC Modified: 2016-05-29 12:30 UTC
From: jacksonpauls at gmail dot com Assigned: ab (profile)
Status: Closed Package: PostgreSQL related
PHP Version: 7.0.6 OS: Linux - Fedora 23
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jacksonpauls at gmail dot com
New email:
PHP Version: OS:

 

 [2016-05-09 11:58 UTC] jacksonpauls at gmail dot com
Description:
------------
pg_insert in PHP 7.0.6 fails to insert timestamps, in PHP 5.6.21 it works.

Test script:
---------------
PostgreSQL commands:

$ createdb test
$ createuser test

PHP commands:

$ php -a
Interactive shell

php > $res = pg_connect("host=localhost dbname=test user=test");
php > pg_query($res, "CREATE TABLE test (ts TIMESTAMP)");
php > pg_insert($res, 'test', ['ts' => '2016-01-01T15:00:00+0100']);
PHP Notice:  pg_insert(): Expects NULL or string for PostgreSQL timestamp field (ts) in php shell code on line 1

Notice: pg_insert(): Expects NULL or string for PostgreSQL timestamp field (ts) in php shell code on line 1

(PHP 5.6.21: last line succeeds with no output.)

Expected result:
----------------
No output

Actual result:
--------------
PHP Notice

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-05-09 12:10 UTC] yohgaki@php.net
-Assigned To: +Assigned To: yohgaki
 [2016-05-09 16:35 UTC] ab@php.net
This should have been fixes in the scope of bug #71062 for the upcoming 7.0.7, please check the RC this week.

Thanks.
 [2016-05-09 20:28 UTC] yohgaki@php.net
-Assigned To: yohgaki +Assigned To: ab
 [2016-05-09 20:28 UTC] yohgaki@php.net
Didn't notice bug #71062. 
To reporter, please close this one if 7.0.7 fixed this issue.
 [2016-05-20 21:34 UTC] ab@php.net
-Status: Assigned +Status: Feedback
 [2016-05-20 21:34 UTC] ab@php.net
@jacksonpauls were you able to check the release candidate?

Thanks.
 [2016-05-22 11:49 UTC] jacksonpauls at gmail dot com
-Status: Feedback +Status: Assigned
 [2016-05-22 11:49 UTC] jacksonpauls at gmail dot com
No, sorry, on holiday, won't be able to check this in the near future. I did look at bug #71062, and think the issue is indeed the same.
 [2016-05-29 12:30 UTC] jacksonpauls at gmail dot com
-Status: Assigned +Status: Closed
 [2016-05-29 12:30 UTC] jacksonpauls at gmail dot com
Fixed in 7.0.7
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 02:01:28 2024 UTC