Bug #75455 [Opn->Csd]: Unable to extend SQLite3 class: out of sequence error

From: Date: Sun, 29 Oct 2017 21:21:52 +0000
Subject: Bug #75455 [Opn->Csd]: Unable to extend SQLite3 class: out of sequence error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-212361@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75455&edit=1 ID: 75455 User updated by: t dot oelgarte at asysgmbh dot de Reported by: t dot oelgarte at asysgmbh dot de Summary: Unable to extend SQLite3 class: out of sequence error -Status: Open +Status: Closed Type: Bug Package: SQLite related Operating System: Ubuntu 14.04 PHP Version: 7.1.11 Block user comment: N Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2017-10-29 21:10:54] t dot oelgarte at asysgmbh dot de Description: ------------ 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); $this->enableExceptions(true); $this->busyTimeout(60000); } } $con = new MySqlite('file.sqlite3'); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=75455&edit=1

« previous php.bugs (#212361) next »