php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51427 Gearman Client AddTaskBackground - The status text is not echoed
Submitted: 2010-03-29 17:27 UTC Modified: 2010-03-29 18:03 UTC
From: james dot smith at cybertill dot co dot uk Assigned: markskilbeck (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: james dot smith at cybertill dot co dot uk
New email:
PHP Version: OS:

 

 [2010-03-29 17:27 UTC] james dot smith at cybertill dot co dot uk
Description:
------------
The worker script function reverse_fn, echo's text in this code segment

# This status loop is not needed, just showing how it works
  for ($x= 0; $x < $workload_size; $x++)
  {
    echo "Sending status: " + $x + 1 . "/$workload_size complete\n";
    $job->sendStatus($x+1, $workload_size);
    $job->sendData(substr($workload, $x, 1));
    sleep(1);
  }

The line 

echo "Sending status: " + $x + 1 . "/$workload_size complete\n";

Should read

echo "Sending status: " . ($x + 1) . "/$workload_size complete\n";

Test script:
---------------
$workload_size = 2;
$x = 0;

echo "Sending status: " + $x + 1 . "/$workload_size complete\n";



Expected result:
----------------
Sending status: 1/2 complete


Actual result:
--------------
1/2 complete


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-03-29 18:03 UTC] markskilbeck@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: markskilbeck
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 17:01:34 2025 UTC