Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.12.2

Bug #2417 [PATCH] Incorrect processing of 'permission denied' style error messages
Submitted: 2004-09-30 09:12 UTC
From: stewart at linux dot org dot au Assigned: danielc
Status: Closed Package: DB
PHP Version: 4.3.8 OS: Debian
Roadmaps: (Not assigned)    
Subscription  


 [2004-09-30 09:12 UTC] stewart at linux dot org dot au
Description: ------------ Tried with latest DB package (1.6.7) as well, and the included patch is against this version. If a query is executed where the native pgsql error code is 'permission denied' it is not translated correctly into a DB_ERROR_ACCESS_VIOLATION error code. Reproduce code: --------------- diff -urN DB-1.6.7-orig/DB/pgsql.php DB-1.6.7/DB/pgsql.php --- DB-1.6.7-orig/DB/pgsql.php 2004-09-26 07:58:00.000000000 +1000 +++ DB-1.6.7/DB/pgsql.php 2004-09-30 18:56:42.947130448 +1000 @@ -254,7 +254,8 @@ '/syntax error at/' => DB_ERROR_SYNTAX, '/violates not-null constraint/' => DB_ERROR_CONSTRAINT_NOT_NULL, '/violates [\w ]+ constraint/' => DB_ERROR_CONSTRAINT, - '/referential integrity violation/' => DB_ERROR_CONSTRAINT + '/referential integrity violation/' => DB_ERROR_CONSTRAINT, + '/permission denied/' => DB_ERROR_ACCESS_VIOLATION, ); } foreach ($error_regexps as $regexp => $code) { Expected result: ---------------- Error will be correctly reported with above patch.

Comments

 [2004-10-04 17:53 UTC] danielc
Fixed in CVS. A new release will be out shortly. Thanks!