php.net |  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
Votes:1
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: rattonwing at yahoo dot com
New email:
PHP Version: OS:

 

 [2011-05-05 05:57 UTC] rattonwing at yahoo dot com
Description:
------------
---
From manual page: http://www.php.net/function.oci-fetch-object#Description
---
Env:Joomla
[begin]
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
[end]

Test script:
---------------
	if (!($cur = $this->query()))
		return null;
	if ($object =oci_fetch_object($cur))
		$ret = $object;
	ocifreestatement($cur);
...
	$this->_oradb->setQuery($query);
	$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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-07 22:35 UTC] sixd@php.net
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 
problem.

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 
http://svn.php.net/viewvc/php/php-src/trunk/ext/oci8/tests/
 [2011-11-07 22:35 UTC] sixd@php.net
-Status: Open +Status: Feedback
 [2012-10-26 05:16 UTC] sixd@php.net
-Status: Feedback +Status: No Feedback
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 18:01:29 2024 UTC