色々のバス修正

守矢諏訪子 <suwako@076.moe>、2026-07-05 00:40
コミット e8800365c65b9c904aa32ef60ae7f24446f1935e ・親 f70a770 ・ファイルを見る

3個のファイル、+15 -5

@@ -6,6 +6,7 @@
66 overflow: auto;
77 font-family: Consolas,Monaco,monospace;
88 border: 1px solid #f545f5;
9+ overflow-x: auto;
910 }
1011
1112 /*pre > code {
@@ -120,8 +120,9 @@
120120
121121 foreach ($lines as $line) {
122122 $i++;
123- $hasBR = substr($line, -1) === '\\';
124- $line = rtrim($line, " \t\r\n\\");
123+ $line = rtrim($line, "\r\n");
124+ $hasBR = str_ends_with($line, '\\');
125+ $line = rtrim($line, "\\");
125126
126127 // コメント
127128 // if (str_starts_with($line, '//')) {
変更 util.php
@@ -253,17 +253,21 @@
253253
254254 switch ($section) {
255255 case LogType::ActivityPub:
256- $logfile .= 'ap_log.text';
256+ $logfile .= 'ap_log.txt';
257257 $success = true;
258258 break;
259259 case LogType::Auth:
260- $logfile .= 'auth_log.text';
260+ $logfile .= 'auth_log.txt';
261261 $success = true;
262262 break;
263263 case LogType::Mailer:
264- $logfile .= 'mail_log.text';
264+ $logfile .= 'mail_log.txt';
265265 $success = true;
266266 break;
267+ case LogType::Image:
268+ $logfile .= 'img_log.txt';
269+ $success = true;
270+ break;
267271 default:
268272 break;
269273 }
@@ -307,6 +311,7 @@
307311 }
308312
309313 function assert_exists(mixed $assertion, Throwable|string|null $description = null): bool {
314+ if (!DEBUG_MODE) return false;
310315 if (ini_get('zend.assertions') < 1) trigger_error('assert機能性が無効です。有効するには、php.iniで「zend.assertions = 1」に設定して下さい。', E_USER_WARNING);
311316 if (isset($assertion)) return true;
312317 assert(false, $description ?? 'Assertion failed: value is not null');
@@ -314,6 +319,7 @@
314319 }
315320
316321 function assert_null(mixed $assertion, Throwable|string|null $description = null): bool {
322+ if (!DEBUG_MODE) return false;
317323 if (ini_get('zend.assertions') < 1) trigger_error('assert機能性が無効です。有効するには、php.iniで「zend.assertions = 1」に設定して下さい。', E_USER_WARNING);
318324 if (is_null($assertion)) return true;
319325 assert(false, $description ?? 'Assertion failed: value is not null');
@@ -321,6 +327,7 @@
321327 }
322328
323329 function assert_not_null(mixed $assertion, Throwable|string|null $description = null): bool {
330+ if (!DEBUG_MODE) return false;
324331 if (ini_get('zend.assertions') < 1) trigger_error('assert機能性が無効です。有効するには、php.iniで「zend.assertions = 1」に設定して下さい。', E_USER_WARNING);
325332 if (!is_null($assertion)) return true;
326333 assert(false, $description ?? 'Assertion failed: value is null');
@@ -328,6 +335,7 @@
328335 }
329336
330337 function assert_unless_success(Result $assertion, Throwable|string|null $description = null): bool {
338+ if (!DEBUG_MODE) return false;
331339 if (ini_get('zend.assertions') < 1) trigger_error('assert機能性が無効です。有効するには、php.iniで「zend.assertions = 1」に設定して下さい。', E_USER_WARNING);
332340 if ($assertion->isSuccess) return true;
333341 assert(false, $description ?? $assertion->message ?? 'Assertion failed: Result is not successful');