php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57681 SCA::getService() immediate_caller_filename/directory problem
Submitted: 2007-05-24 06:35 UTC Modified: 2007-07-06 12:22 UTC
From: gcc@php.net Assigned:
Status: Closed Package: SCA_SDO (PECL)
PHP Version: 5.2.1 OS: Win XP
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: gcc@php.net
New email:
PHP Version: OS:

 

 [2007-05-24 06:35 UTC] gcc@php.net
Description:
------------
SCA::getService() is using 
   $backtrace                 = debug_backtrace();
   $immediate_caller_filename = $backtrace[0]['file'];
to calculate the immediate_caller_filename/directory.  When SCA::getService() is called from fillInReferences, this corresponds to the SCA.php file, not the component.

Expected result:
----------------
$immediate_caller_filename/directory should be the component filename and directory.

Actual result:
--------------
$immediate_caller_filename/directory are the SCA.php filename and directory.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-06 12:22 UTC] mfp@php.net
This is fixed in that now we no longer use getService in any context other than called from a client script. The problem was occurring because we were also using getService from fillInReferences to create a proxy to fill in a reference within a component, when the backtrace was quite different. We now create a proxy properly in fillInReferences rather than call getService.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 13 10:01:27 2025 UTC