initial
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
Index: vendor/monolog/monolog/src/Monolog/Logger.php
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- vendor/monolog/monolog/src/Monolog/Logger.php (revision )
|
||||
+++ vendor/monolog/monolog/src/Monolog/Logger.php (revision )
|
||||
@@ -285,6 +285,10 @@
|
||||
*/
|
||||
public function addRecord($level, $message, array $context = array())
|
||||
{
|
||||
+ if ($message instanceof \Throwable) {
|
||||
+ $message = \MightyPork\Utils\Utils::getStackTraceAsString($message);
|
||||
+ }
|
||||
+
|
||||
if (!$this->handlers) {
|
||||
$this->pushHandler(new StreamHandler('php://stderr', static::DEBUG));
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
Index: vendor/laravel/framework/src/Illuminate/Support/Collection.php
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- vendor/laravel/framework/src/Illuminate/Support/Collection.php (revision )
|
||||
+++ vendor/laravel/framework/src/Illuminate/Support/Collection.php (revision )
|
||||
@@ -1736,7 +1736,15 @@
|
||||
*/
|
||||
public function toJson($options = 0)
|
||||
{
|
||||
- return json_encode($this->jsonSerialize(), $options);
|
||||
+ // Patch to convert INF or NAN to null.
|
||||
+ $serialized = $this->jsonSerialize();
|
||||
+ $resp = json_encode($serialized, $options);
|
||||
+ if (json_last_error() == JSON_ERROR_INF_OR_NAN) {
|
||||
+ $resp = json_encode(unserialize(
|
||||
+ str_replace(array('d:NAN;','d:INF;'), 'd:0;', serialize($serialized))
|
||||
+ ), $options);
|
||||
+ }
|
||||
+ return $resp;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -0,0 +1,21 @@
|
||||
Index: vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php (revision )
|
||||
+++ vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php (revision )
|
||||
@@ -61,10 +61,11 @@
|
||||
*/
|
||||
protected function handleViewException(Exception $e, $obLevel)
|
||||
{
|
||||
+ $buffered = '';
|
||||
while (ob_get_level() > $obLevel) {
|
||||
- ob_end_clean();
|
||||
+ $buffered .= ob_get_clean();
|
||||
}
|
||||
|
||||
- throw $e;
|
||||
+ throw new \App\Exceptions\ViewException($e, $buffered);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
Index: vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php (revision )
|
||||
+++ vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php (revision )
|
||||
@@ -119,6 +119,15 @@
|
||||
if (! is_null($this->cachePath)) {
|
||||
$contents = $this->compileString($this->files->get($this->getPath()));
|
||||
|
||||
+ if (env('DEBUG_BLADE')) {
|
||||
+ $p = e(str_replace(resource_path('views'), '', $this->getPath()));
|
||||
+ $p = trim($p, '/');
|
||||
+ $p = str_replace('.blade.php', '', $p);
|
||||
+ $p = str_replace('.php', '', $p);
|
||||
+ $p = str_replace('/', '.', $p);
|
||||
+ $contents = "\n<!-- BEGIN $p -->\n" . trim($contents) . "\n<!-- END $p -->\n";
|
||||
+ }
|
||||
+
|
||||
$this->files->put($this->getCompiledPath($this->getPath()), $contents);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
Index: vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php (date 1520624733000)
|
||||
+++ vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php (date 1520624733000)
|
||||
@@ -395,6 +395,8 @@
|
||||
return $this->abilities[$ability];
|
||||
}
|
||||
|
||||
+ throw new \LogicException("Permission/ability \"$ability\" not defined.");
|
||||
+
|
||||
return function () {
|
||||
return false;
|
||||
};
|
||||
Reference in New Issue
Block a user