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: -
From: shaun at shaunfreeman dot name Assigned:
Status: Open Package: Documentation problem
PHP Version: 7.3.9 OS: return type in documention is wr
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
48 + 16 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 21 07:01:31 2024 UTC