From decb9e29076e626acb5d328c505ae03dd4718a3a Mon Sep 17 00:00:00 2001 From: Pontoporeia Date: Fri, 24 Apr 2026 13:38:14 +0200 Subject: [PATCH] fix: replace mb_strlen/mb_substr in student-preview.php (mbstring unavailable) --- TODO.md | 1 + app/storage/posterg.db | Bin 270336 -> 270336 bytes app/storage/test.db | Bin 602112 -> 602112 bytes app/templates/partials/student-preview.php | 4 ++-- 4 files changed, 3 insertions(+), 2 deletions(-) diff --git a/TODO.md b/TODO.md index c4b19c5..b3e92ba 100644 --- a/TODO.md +++ b/TODO.md @@ -2,6 +2,7 @@ ## Fixes - [x] Replace `mb_strtolower` with `strtolower` in admin/index.php (mbstring not available in php8.4-fpm) +- [x] Replace `mb_strlen`/`mb_substr` with `strlen`/`substr` in student-preview.php (same root cause) ## Features - [x] Student name popover preview in /repertoire (zero per-hover requests) diff --git a/app/storage/posterg.db b/app/storage/posterg.db index 64251a7d1deb27d160cd78f76f72b477462d0274..ae8059b5accdaea2b9ff8764569cabb45db49901 100644 GIT binary patch delta 160 zcmZoTAkc6?U_-fnJtrpzvp8cxVtQ&ZuOK_KI%7^|a%x_2YJ5p$L29vr02{L^V`6f0 zYH=|{ghzlCD3X?6l$%%r5s~3#VU}miNz6+x1)0Jj#LTS8n3kEBn3Gvj3Dv~U#H`Gi uSP)-Ol%HOdm|H9*zz8%YzbKO{HLoPGBr`v+*rv&#&497ZfN7Zl^9KOuqA(Qz delta 160 zcmZoTAkc6?U_-fnJv%1{vp8cxVtQ&ZmmoW{I%7^|a%x_2YJ5p$L29vt02{L^V`6f0 zYH=|{gj0YOD3X?6l$%%r5fSBOVU}miNz6+x1)0Jo#LTS8n3kEBn3Gvj3Dv~U#H`Gi uSP)-Ol%HOdm|H9&zz8%YzbKO{HLoPGBr`v+ShvZb&497ZfN7Zl^9KOh_b=oC diff --git a/app/storage/test.db b/app/storage/test.db index c302e5955bb4b610af0e44658b09055f0ae5256e..a917362920c6837995379425cdd0873f72b26ee3 100644 GIT binary patch delta 174 zcmXZUPYQxS6o7HY@oywqn;?RMjA+$6KzEUcj544zgEJAXk{0hg9m%6)*!BnCH;nl( z=AY;7l_W9WGK00S={n*U*2q#QD+<>eVUJnJ&kV~_SUbxy3nr;_*P@$cpZfg38dUY; zcZoNgUs)v;Hq!O~Xyx$}LsOVe*B!QYm$B)hJGl_bp_5wK`x^)tfk(gze1d==B!~#& EFWu`i82|tP delta 174 zcmXZUO$x#=5I|w3=|6~76y3S7A}++akqjj*fi?+AM7pxL$ay?ck7A{6KX`8#%V8`( z&)X}>Qnmw44Y&C!VP|MX#iiwU*K2O~Ma)h>RmH8HB`cyyYGpcdvuqb3J3vdadHgQ% znz0MiLQ*SS|BsddI|AvuHmWhy*-Zh{MH!KE>BtEs?e&cw!DHZ&c?>;99%GM*$Mg%% Ck}~K3 diff --git a/app/templates/partials/student-preview.php b/app/templates/partials/student-preview.php index 962f669..8327e53 100644 --- a/app/templates/partials/student-preview.php +++ b/app/templates/partials/student-preview.php @@ -10,8 +10,8 @@ foreach ($theses as $t): $synopsis = $t['synopsis'] ?? ''; // Truncate synopsis to ~160 chars - if (mb_strlen($synopsis) > 160) { - $synopsis = mb_substr($synopsis, 0, 157) . '…'; + if (strlen($synopsis) > 160) { + $synopsis = substr($synopsis, 0, 157) . '…'; } $meta = array_filter([ $t['year'] ?? null,