php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57769 Undefined constant
Submitted: 2007-08-04 12:47 UTC Modified: 2007-09-12 13:45 UTC
From: pcdinh at gmail dot com Assigned: va (profile)
Status: Closed Package: yami (PECL)
PHP Version: 5.2.1 OS: Windows
Private report: No CVE-ID: None
 [2007-08-04 12:47 UTC] pcdinh at gmail dot com
Description:
------------
You have used of undefined constant CalculatorAuditorServant in your test file: php_yami_test

Reproduce code:
---------------
Please have a look at the code line 207

if ( yami_agent_object_register($agent, "CalculatorAuditor", CalculatorAuditorServant, "Foo" ) ) {
		echo "... success\n";
}

CalculatorAuditorServant is used as if it is a constant. In fact it should be used a string, a function name, because you have declared a so-called function.

Expected result:
----------------
The notice Use of undefined constant CalculatorAuditorServant should not happen

Actual result:
--------------
The notice Use of undefined constant CalculatorAuditorServant  happens

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-09 00:41 UTC] vijay at planetbazaar dot com
Thanks for the bug report. Writing 'servants' in PHP is currently not supported. This is partly because I did not have a good grasp of invoking callbacks from a PHP extension module. The other reason is that the primary use case is for writing PHP scripts (client code) that run in a web server as opposed to console applications.

If you would like to see support for writing YAMI 'servants' in PHP then please file a feature request.

For now I propose to remove the offending code in the test harness which was primarillay meant for testing the 'servant' feature which never got implemented.
 [2007-09-12 13:45 UTC] vijay at planetbazaar dot com
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.

Servant functional test code is now commented out. The original bug report has also been taken care off and should be ready when the functionality is implemented.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Nov 18 23:01:35 2019 UTC