File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -31,11 +31,14 @@ function get_popular_codepoints(Database $db) : Array {
3131 }
3232 }
3333 $ cps = [];
34- $ list = join (', ' , array_unique ($ intlist ));
35- $ data = $ db ->getAll ('SELECT cp, name, gc FROM codepoints
36- WHERE cp IN ( ' .$ list .' ) ORDER BY FIELD( cp, ' .$ list .' ) ' );
37- if (is_array ($ data )) {
38- foreach ($ data as $ set ) {
34+ $ db_data = null ;
35+ if ($ intlist ) {
36+ $ list = join (', ' , array_unique ($ intlist ));
37+ $ db_data = $ db ->getAll ('SELECT cp, name, gc FROM codepoints
38+ WHERE cp IN ( ' .$ list .' ) ORDER BY FIELD( cp, ' .$ list .' ) ' );
39+ }
40+ if (is_array ($ db_data )) {
41+ foreach ($ db_data as $ set ) {
3942 $ candidate = Codepoint::getCached ($ set , $ db );
4043 if ($ candidate ->sensitivity ->value > SENSITIVITY_LEVEL ::RAISED ->value ) {
4144 continue ;
You can’t perform that action at this time.
0 commit comments