Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jupiter committed Mar 26, 2019
1 parent 8a72e1c commit 86de451
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config/routes/console.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

$params = [];
for ($i=2; $i<count($argv); ++$i) {
$parts = explode("=", $argv[$i]);
$parts = explode("=", $argv[$i], 2);
$params[$parts[0]] = $parts[1];
}

Expand Down
7 changes: 3 additions & 4 deletions lib/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* get app instance
* @param string $appName
* @param array $settings
* @param boolean $console
*
* @return \Lib\Framework\App
*/
Expand Down Expand Up @@ -48,7 +47,7 @@ function baseUrl($showIndex = null)
function debug($var, $exit = false, $return = false, $separator = null)
{
$log = "";
if ($separator == null) $separator = app()->console ? "\n" : "<br/>";
if ($separator == null) $separator = app()->isConsole() ? "\n" : "<br/>";

if ($separator == "<br/>") $log .= '<pre>';
if (is_array($var)) {
Expand Down Expand Up @@ -85,7 +84,7 @@ function dbLog($exit = false, $return = false, $separator = null)
$log = "";
$queryLog = $app->resolve(\Illuminate\Database\ConnectionInterface::class)->getQueryLog();

if ($separator == null) $separator = $app->console ? "\n" : "<br/>";
if ($separator == null) $separator = $app->isConsole() ? "\n" : "<br/>";

if (!empty($queryLog)) {
$log = "QUERY LOG (".count($queryLog)." queries):{$separator}{$separator}";
Expand Down Expand Up @@ -127,7 +126,7 @@ function dbLastQuery($exit = false, $return = false, $separator = null)
$log = "";
$queryLog = $app->resolve(\Illuminate\Database\ConnectionInterface::class)->getQueryLog();

if ($separator == null) $separator = $app->console ? "\n" : "<br/>";
if ($separator == null) $separator = $app->isConsole() ? "\n" : "<br/>";

for ($i = count($queryLog)-1; $i >= 0; $i--) {
$ql = $queryLog[$i];
Expand Down

0 comments on commit 86de451

Please sign in to comment.