Bug #51427 [Opn->Csd]: Gearman Client AddTaskBackground - The status text is not echoed

From: Date: Mon, 29 Mar 2010 16:03:05 +0000
Subject: Bug #51427 [Opn->Csd]: Gearman Client AddTaskBackground - The status text is not echoed
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-4121@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=51427&edit=1 ID: 51427 Updated by: markskilbeck@php.net Reported by: james dot smith at cybertill dot co dot uk Summary: Gearman Client AddTaskBackground - The status text is not echoed -Status: Open +Status: Closed Type: Bug Package: Documentation problem PHP Version: Irrelevant -Assigned To: +Assigned To: markskilbeck Previous Comments: ------------------------------------------------------------------------ [2010-03-29 17:27:03] 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51427&edit=1

« previous php.doc.bugs (#4121) next »