|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74413 Wrong reflection on SQLite3::enableExceptions
Submitted: 2017-04-11 10:50 UTC Modified: -
From: fabien dot villepinte at gmail dot com Assigned:
Status: Closed Package: SQLite related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: fabien dot villepinte at gmail dot com
New email:
PHP Version: OS:


 [2017-04-11 10:50 UTC] fabien dot villepinte at gmail dot com
The parameter of SQLite3::enableExceptions is optional (see: ), but it is described as required by reflection.

Test script:

$rm = new ReflectionMethod(SQLite3::class, "enableExceptions");
printf("%d\n%d\n", $rm->getNumberOfParameters(), $rm->getNumberOfRequiredParameters());
foreach ($rm->getParameters() as $param) {
    printf("Parameter #%d %s OPTIONAL\n", $param->getPosition(), $param->isOptional() ? "IS" : "IS NOT");

Expected result:
Parameter #0 IS OPTIONAL

Actual result:
Parameter #0 IS NOT OPTIONAL


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-11 11:17 UTC]
Automatic comment on behalf of krakjoe
Log: fixed bug #74413 wrong reflection on SQLite3::enableExceptions
 [2017-04-11 11:17 UTC]
-Status: Open +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 01:01:28 2024 UTC