|  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: Assigned:
Status: Closed Package: SCA_SDO (PECL)
PHP Version: 5.2.1 OS: Win XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [2007-05-24 06:35 UTC]
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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-06 12:22 UTC]
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-2021 The PHP Group
All rights reserved.
Last updated: Wed Dec 01 18:03:35 2021 UTC