|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54664 Warning oci_fetch_object() -->Trying to get property of non-object
Submitted: 2011-05-05 05:57 UTC Modified: 2012-10-26 05:16 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: rattonwing at yahoo dot com Assigned:
Status: No Feedback Package: OCI8 related
PHP Version: 5.3.6 OS: Windows 7
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:
Solve the problem:
41 - 26 = ?
Subscribe to this entry?

 [2011-05-05 05:57 UTC] rattonwing at yahoo dot com
From manual page:
Warning: oci_fetch_object() [function.oci-fetch-object]: ORA-24374: define not 
done before fetch or execute and fetch in O.php on line 587

Notice: Trying to get property of non-object in X.php on line 78

Test script:
	if (!($cur = $this->query()))
		return null;
	if ($object =oci_fetch_object($cur))
		$ret = $object;
	$result = $this->_oradb->loadObject();
	$this->DesireProp = $result->FromOra;

Expected result:
$this->DesireProp is not null (a year number)

Actual result:
Notice: Trying to get property of non-object


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-07 22:35 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

Please give a standalone PHP script and a SQL creation script that reproduces the 

Oracle objects created with case-insensitive names in the DB will be returned to 
PHP OCI8 with uppercase names.  See the fetch_object*.phpt examples in
 [2011-11-07 22:35 UTC]
-Status: Open +Status: Feedback
 [2012-10-26 05:16 UTC]
-Status: Feedback +Status: No Feedback
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 30 22:01:29 2024 UTC