create-prisma-php-app 1.8.19 → 1.8.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bootstrap.php +6 -14
- package/dist/src/app/index.php +0 -1
- package/package.json +1 -1
package/dist/bootstrap.php
CHANGED
|
@@ -190,16 +190,12 @@ $pathname = "";
|
|
|
190
190
|
|
|
191
191
|
ob_start();
|
|
192
192
|
|
|
193
|
-
set_error_handler(function ($severity, $message, $file, $line) {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
set_exception_handler(function ($exception) {
|
|
198
|
-
echo "<div class='error'>An error occurred: " . $exception->getMessage() . "</div>";
|
|
193
|
+
set_error_handler(function ($severity, $message, $file, $line) use (&$content) {
|
|
194
|
+
echo "<div class='error'>An error occurred: $severity - $message in $file on line $line</div>";
|
|
195
|
+
$content .= ob_get_clean();
|
|
199
196
|
});
|
|
200
197
|
|
|
201
198
|
set_exception_handler(function ($exception) use (&$content) {
|
|
202
|
-
ob_start();
|
|
203
199
|
echo "<div class='error'>An error occurred: " . htmlspecialchars($exception->getMessage(), ENT_QUOTES, 'UTF-8') . "</div>";
|
|
204
200
|
$content .= ob_get_clean();
|
|
205
201
|
});
|
|
@@ -207,12 +203,8 @@ set_exception_handler(function ($exception) use (&$content) {
|
|
|
207
203
|
register_shutdown_function(function () use (&$content) {
|
|
208
204
|
$error = error_get_last();
|
|
209
205
|
if ($error && ($error['type'] === E_ERROR || $error['type'] === E_PARSE || $error['type'] === E_CORE_ERROR || $error['type'] === E_COMPILE_ERROR)) {
|
|
210
|
-
ob_start();
|
|
211
206
|
echo "<div class='error'>An error occurred: " . $error['message'] . "</div>";
|
|
212
|
-
$
|
|
213
|
-
$content = $errorContent . $content;
|
|
214
|
-
ob_clean();
|
|
215
|
-
echo "<html><body>{$content}</body></html>";
|
|
207
|
+
$content .= ob_get_clean();
|
|
216
208
|
}
|
|
217
209
|
});
|
|
218
210
|
|
|
@@ -227,7 +219,6 @@ try {
|
|
|
227
219
|
else
|
|
228
220
|
$isParentLayout = false;
|
|
229
221
|
|
|
230
|
-
ob_start();
|
|
231
222
|
if (!empty($contentToInclude)) {
|
|
232
223
|
if (!$isParentLayout) {
|
|
233
224
|
require_once $contentToInclude;
|
|
@@ -250,5 +241,6 @@ try {
|
|
|
250
241
|
}
|
|
251
242
|
$content .= ob_get_clean();
|
|
252
243
|
} catch (Throwable $e) {
|
|
253
|
-
echo "<div class='error'>An error occurred: " . $e->getMessage() . "</div>";
|
|
244
|
+
echo "<div class='error'>An error occurred: " . htmlspecialchars($e->getMessage(), ENT_QUOTES, 'UTF-8') . "</div>";
|
|
245
|
+
$content .= ob_get_clean();
|
|
254
246
|
}
|
package/dist/src/app/index.php
CHANGED