Bug #72176 [NEW]: pg_insert timestamp regression
From: jacksonpauls at gmail dot com
Operating system: Linux - Fedora 23
PHP version: 7.0.6
Package: PostgreSQL related
Bug Type: Bug
Bug description:pg_insert timestamp regression
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
--
Edit bug report at https://bugs.php.net/bug.php?id=72176&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72176&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72176&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72176&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=72176&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=72176&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=72176&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=72176&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=72176&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=72176&r=support
Expected behavior: https://bugs.php.net/fix.php?id=72176&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=72176&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=72176&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=72176&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72176&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=72176&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=72176&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=72176&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=72176&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=72176&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=72176&r=mysqlcfg
Thread (6 messages)
- jacksonpauls at gmail dot com