Doc #55685 [Opn->Csd]: Wrong input type of GearmanJob::setReturn
| From: | nikic@php.net | Date: | Tue, 13 Sep 2011 18:54:56 +0000 |
| Subject: | Doc #55685 [Opn->Csd]: Wrong input type of GearmanJob::setReturn | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-7190@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55685&edit=1
ID: 55685
Updated by: nikic@php.net
Reported by: schkovich at gmail dot com
Summary: Wrong input type of GearmanJob::setReturn
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
Operating System: Ubuntu 11.04
-PHP Version: 5.3.8
+PHP Version: Irrelevant
-Assigned To:
+Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
Previous Comments:
------------------------------------------------------------------------
[2011-09-13 18:53:11] nikic@php.net
Automatic comment from SVN on behalf of nikic
Revision: http://svn.php.net/viewvc/?view=revision&revision=316682
Log: Fix Doc Bug #55685: Wrong input type of GearmanJob::setReturn
------------------------------------------------------------------------
[2011-09-13 17:12:22] schkovich at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/gearmanjob.setreturn%23Description
---
Manual reads that parameter of function GearmanJob:setReturn is string while it
should be integer (long).
Test script:
---------------
#!/usr/bin/env php
<?php
$worker = new GearmanWorker();
$worker->addServer();
$worker->addFunction('listRepo', 'listRepoCallback');
while ($worker->work());
function listRepoCallback($job)
{
$result = shell_exec(
'svn ls --username=yyyy --password=xxxxx '
. 'https://project.svn.beanstalkapp.com/main/trunk');
$job->setReturn(json_encode($result));
}
?>
Expected result:
----------------
Script executing without a problem.
Actual result:
--------------
PHP Warning: GearmanJob::setReturn() expects parameter 1 to be long, string
given in /home/ubuntu/listGmWorker.php on line 23
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55685&edit=1