File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,9 @@ private function lockBlocking(): void
9797 */
9898 private function lockPcntl (): void
9999 {
100- $ timebox = new PcntlTimeout ($ this ->timeout );
100+ $ timeoutInt = (int ) ceil ($ this ->timeout );
101+
102+ $ timebox = new PcntlTimeout ($ timeoutInt );
101103
102104 try {
103105 $ timebox ->timeBoxed (
@@ -106,7 +108,7 @@ function (): void {
106108 }
107109 );
108110 } catch (DeadlineException $ e ) {
109- throw TimeoutException::create ($ this -> timeout );
111+ throw TimeoutException::create ($ timeoutInt );
110112 }
111113 }
112114
Original file line number Diff line number Diff line change 1414 *
1515 * This class requires the pcntl module and supports the cli sapi only.
1616 *
17+ * Only integer timeout is supported - https://github.com/php/php-src/issues/11828.
18+ *
1719 * @internal
1820 */
1921final class PcntlTimeout
You can’t perform that action at this time.
0 commit comments