|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75455 Unable to extend SQLite3 class: out of sequence error
Submitted: 2017-10-29 21:10 UTC Modified: 2017-10-29 21:21 UTC
From: t dot oelgarte at asysgmbh dot de Assigned:
Status: Closed Package: SQLite related
PHP Version: 7.1.11 OS: Ubuntu 14.04
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: t dot oelgarte at asysgmbh dot de
New email:
PHP Version: OS:


 [2017-10-29 21:10 UTC] t dot oelgarte at asysgmbh dot de
If i extend the SQLite3 class and overwrite it's constructor, then the call to the parent constructor (the constructor of SQLite3) will throw an Exception with the following error message: "Unable to open database: library routine called out of sequence".

Test script:
class MySqlite extends \SQLite3 {

  function __construct(string $filename, int $flags = null, string $encryption_key) {
    parent::__construct($filename, $flags, $encryption_key);


$con = new MySqlite('file.sqlite3');


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-10-29 21:21 UTC] t dot oelgarte at asysgmbh dot de
-Status: Open +Status: Closed
 [2017-10-29 21:21 UTC] t dot oelgarte at asysgmbh dot de
My bad. The constructor does not accept null as the second argument. Somehow my IDE made the assumption that null was an acceptable default value for the flags. Guess that isn't the case.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Aug 17 10:05:45 2022 UTC