Skip to content

PGSQL pg_untrace(): Argument #1 ($connection) must be of type resource or null, PgSql\Connection given #12763

Closed
@degtyaryov

Description

@degtyaryov

Description

The following code:

<?php

$db = pg_connect("host=localhost dbname=postgres port=5432 user=postgres");
pg_untrace($db);

Resulted in this output:

Fatal error: Uncaught TypeError: pg_untrace(): Argument #1 ($connection) must be of type resource or null, PgSql\Connection given in pg_untrace_test.php:4
Stack trace:
#0 pg_untrace_test.php(4): pg_untrace(Object(PgSql\Connection))
#1 {main}
  thrown in pg_untrace_test.php on line 4

But I expected this output instead:

PHP Version

PHP 8.3

Operating System

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions