File tree Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 4545use function sprintf ;
4646use function strtolower ;
4747use function trim ;
48+ use function var_dump ;
4849use const DIRECTORY_SEPARATOR ;
4950use const PHP_BINARY ;
5051use const TD_INDEX_FILE ;
@@ -498,11 +499,14 @@ protected function doProcess(
498499 )
499500 );
500501
501- $ path = escapeshellcmd ($ publicFile );
502-
502+ $ docRoot = dirname ($ publicFile );
503503 $ command = sprintf (
504- "%s -S $ host: $ port ' $ path' " ,
505- PHP_BINARY
504+ '%s -t %s -S %s:%d %s ' ,
505+ PHP_BINARY ,
506+ escapeshellcmd ($ docRoot ),
507+ escapeshellcmd ($ host ),
508+ $ port ,
509+ escapeshellcmd ($ publicFile ),
506510 );
507511
508512 $ output ->writeln ('' );
@@ -534,19 +538,22 @@ protected function doProcess(
534538 $ output ->writeln ('' );
535539 if (Consolidation::isUnix ()
536540 && (
537- !$ output ->isVeryVerbose ()
541+ ! $ output ->isVeryVerbose ()
538542 && ! $ output ->isDebug ()
539543 )
540544 && file_exists ('/dev/null ' )
541545 ) {
542- $ command .= " 2>&1 & echo $! " ;
543- $ command = "cd " . dirname ($ publicFile ) . " && $ command " ;
546+ $ command = sprintf (
547+ 'cd %s && %s > /dev/null 2>&1 ' ,
548+ $ docRoot ,
549+ $ command
550+ );
544551 }
545-
546552 // point to public directory
547553 chdir (dirname ($ publicFile ));
548554
549555 exec ($ command , $ array , $ result_code );
556+
550557 if ($ result_code !== 0 ) {
551558 return self ::FAILURE ;
552559 } elseif (!empty ($ array [1 ])) {
Original file line number Diff line number Diff line change @@ -325,6 +325,7 @@ private function getColumnDeclarationAttributeOnUpdate(
325325 ) {
326326 $ attribute = 'UNSIGNED ZEROFILL ' ;
327327 }
328+ $ attribute = preg_replace ('~\s+~ ' , ' ' , $ attribute );
328329 $ allowedAttributes = [
329330 'ON UPDATE CURRENT_TIMESTAMP ' => [
330331 DateTimeType::class,
You can’t perform that action at this time.
0 commit comments