色々のバス修正
守矢諏訪子 <suwako@076.moe>、2026-07-05 00:40
コミット e8800365c65b9c904aa32ef60ae7f24446f1935e
・親 f70a770
・ファイルを見る
3個のファイル、+15 -5
| @@ -6,6 +6,7 @@ | ||
| 6 | 6 | overflow: auto; |
| 7 | 7 | font-family: Consolas,Monaco,monospace; |
| 8 | 8 | border: 1px solid #f545f5; |
| 9 | + overflow-x: auto; | |
| 9 | 10 | } |
| 10 | 11 | |
| 11 | 12 | /*pre > code { |
| @@ -120,8 +120,9 @@ | ||
| 120 | 120 | |
| 121 | 121 | foreach ($lines as $line) { |
| 122 | 122 | $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, "\\"); | |
| 125 | 126 | |
| 126 | 127 | // コメント |
| 127 | 128 | // if (str_starts_with($line, '//')) { |
変更
util.php
| @@ -253,17 +253,21 @@ | ||
| 253 | 253 | |
| 254 | 254 | switch ($section) { |
| 255 | 255 | case LogType::ActivityPub: |
| 256 | - $logfile .= 'ap_log.text'; | |
| 256 | + $logfile .= 'ap_log.txt'; | |
| 257 | 257 | $success = true; |
| 258 | 258 | break; |
| 259 | 259 | case LogType::Auth: |
| 260 | - $logfile .= 'auth_log.text'; | |
| 260 | + $logfile .= 'auth_log.txt'; | |
| 261 | 261 | $success = true; |
| 262 | 262 | break; |
| 263 | 263 | case LogType::Mailer: |
| 264 | - $logfile .= 'mail_log.text'; | |
| 264 | + $logfile .= 'mail_log.txt'; | |
| 265 | 265 | $success = true; |
| 266 | 266 | break; |
| 267 | + case LogType::Image: | |
| 268 | + $logfile .= 'img_log.txt'; | |
| 269 | + $success = true; | |
| 270 | + break; | |
| 267 | 271 | default: |
| 268 | 272 | break; |
| 269 | 273 | } |
| @@ -307,6 +311,7 @@ | ||
| 307 | 311 | } |
| 308 | 312 | |
| 309 | 313 | function assert_exists(mixed $assertion, Throwable|string|null $description = null): bool { |
| 314 | + if (!DEBUG_MODE) return false; | |
| 310 | 315 | if (ini_get('zend.assertions') < 1) trigger_error('assert機能性が無効です。有効するには、php.iniで「zend.assertions = 1」に設定して下さい。', E_USER_WARNING); |
| 311 | 316 | if (isset($assertion)) return true; |
| 312 | 317 | assert(false, $description ?? 'Assertion failed: value is not null'); |
| @@ -314,6 +319,7 @@ | ||
| 314 | 319 | } |
| 315 | 320 | |
| 316 | 321 | function assert_null(mixed $assertion, Throwable|string|null $description = null): bool { |
| 322 | + if (!DEBUG_MODE) return false; | |
| 317 | 323 | if (ini_get('zend.assertions') < 1) trigger_error('assert機能性が無効です。有効するには、php.iniで「zend.assertions = 1」に設定して下さい。', E_USER_WARNING); |
| 318 | 324 | if (is_null($assertion)) return true; |
| 319 | 325 | assert(false, $description ?? 'Assertion failed: value is not null'); |
| @@ -321,6 +327,7 @@ | ||
| 321 | 327 | } |
| 322 | 328 | |
| 323 | 329 | function assert_not_null(mixed $assertion, Throwable|string|null $description = null): bool { |
| 330 | + if (!DEBUG_MODE) return false; | |
| 324 | 331 | if (ini_get('zend.assertions') < 1) trigger_error('assert機能性が無効です。有効するには、php.iniで「zend.assertions = 1」に設定して下さい。', E_USER_WARNING); |
| 325 | 332 | if (!is_null($assertion)) return true; |
| 326 | 333 | assert(false, $description ?? 'Assertion failed: value is null'); |
| @@ -328,6 +335,7 @@ | ||
| 328 | 335 | } |
| 329 | 336 | |
| 330 | 337 | function assert_unless_success(Result $assertion, Throwable|string|null $description = null): bool { |
| 338 | + if (!DEBUG_MODE) return false; | |
| 331 | 339 | if (ini_get('zend.assertions') < 1) trigger_error('assert機能性が無効です。有効するには、php.iniで「zend.assertions = 1」に設定して下さい。', E_USER_WARNING); |
| 332 | 340 | if ($assertion->isSuccess) return true; |
| 333 | 341 | assert(false, $description ?? $assertion->message ?? 'Assertion failed: Result is not successful'); |