We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03f4a7b commit 223e98bCopy full SHA for 223e98b
1 file changed
system/Common.php
@@ -119,7 +119,7 @@ function clean_path(string $path): string
119
*
120
* > command('migrate:create SomeMigration');
121
122
- * @return string
+ * @return false|string
123
*/
124
function command(string $command)
125
{
@@ -185,13 +185,21 @@ function command(string $command)
185
$params[$arg] = $value;
186
}
187
188
+ $bufferLevel = ob_get_level();
189
+
190
try {
191
ob_start();
192
service('commands')->run($command, $params);
193
194
+ if (ob_get_level() <= $bufferLevel) {
195
+ return false;
196
+ }
197
198
return ob_get_contents();
199
} finally {
- ob_end_clean();
200
+ while (ob_get_level() > $bufferLevel) {
201
+ ob_end_clean();
202
203
204
205
0 commit comments