Doc #55685 [NEW]: Wrong input type of GearmanJob::setReturn
| From: | schkovich at gmail dot com | Date: | Tue, 13 Sep 2011 17:12:22 +0000 |
| Subject: | Doc #55685 [NEW]: Wrong input type of GearmanJob::setReturn | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-7182@lists.php.net to get a copy of this message | ||
From:
Operating system: Ubuntu 11.04
PHP version: 5.3.8
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:Wrong input type of GearmanJob::setReturn
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 bug report at https://bugs.php.net/bug.php?id=55685&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55685&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55685&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55685&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=55685&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55685&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=55685&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=55685&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=55685&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=55685&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=55685&r=support
Expected behavior: https://bugs.php.net/fix.php?id=55685&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=55685&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=55685&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=55685&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55685&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=55685&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=55685&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=55685&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=55685&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=55685&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=55685&r=mysqlcfg