php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #55685 Wrong input type of GearmanJob::setReturn
Submitted: 2011-09-13 17:12 UTC Modified: 2011-09-13 18:54 UTC
From: schkovich at gmail dot com Assigned: nikic (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Ubuntu 11.04
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: schkovich at gmail dot com
New email:
PHP Version: OS:

 

 [2011-09-13 17:12 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-09-13 18:53 UTC] nikic@php.net
Automatic comment from SVN on behalf of nikic
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=316682
Log: Fix Doc Bug #55685: Wrong input type of GearmanJob::setReturn
 [2011-09-13 18:54 UTC] nikic@php.net
-Status: Open +Status: Closed -PHP Version: 5.3.8 +PHP Version: Irrelevant -Assigned To: +Assigned To: nikic
 [2011-09-13 18:54 UTC] nikic@php.net
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.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 22:00:01 2026 UTC