php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #78593 Need to change the documentation to reflect the actual result.
Submitted: 2019-09-25 07:44 UTC Modified: 2025-04-25 14:44 UTC
From: shaun at shaunfreeman dot name Assigned: vrana (profile)
Status: Closed Package: *General Issues
PHP Version: 7.3.9 OS: return type in documention is wr
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: shaun at shaunfreeman dot name
New email:
PHP Version: OS:

 

 [2019-09-25 07:44 UTC] shaun at shaunfreeman dot name
Description:
------------
---
From manual page: https://php.net/mysql-xdevapi-session.getdefaultschema
---
The documentation says the return type is NULL or String when retrieving the default schema when in reality it's NULL or a mysql_xdevapi\Schema object.

I assume this is the right behaviour and documentation needs updating

I will send an update to the documentation for this.


Test script:
---------------
$session = mysql_xdevapi\getSession('mysqlzx://dbuser:654321@mysql:33060/dbname');

$defaultSchema = $session->getDefaultSchema();

var_dump($defaultSchema);

Expected result:
----------------
string(6) "dbname" 

Actual result:
--------------
object(mysql_xdevapi\Schema)#2 (1) { ["name"]=> string(6) "dbname" }

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2025-04-25 14:44 UTC] vrana@php.net
-Status: Open +Status: Closed -Package: Documentation problem +Package: *General Issues -Assigned To: +Assigned To: vrana
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Apr 27 08:01:27 2025 UTC