We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3493991 commit 74de533Copy full SHA for 74de533
1 file changed
codepoints.net/lib/site_functions.php
@@ -31,11 +31,14 @@ function get_popular_codepoints(Database $db) : Array {
31
}
32
33
$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) {
+ $db_data = null;
+ if ($intlist) {
+ $list = join(',', array_unique($intlist));
+ $db_data = $db->getAll('SELECT cp, name, gc FROM codepoints
+ WHERE cp IN ( '.$list.' ) ORDER BY FIELD( cp, '.$list.' )');
39
+ }
40
+ if (is_array($db_data)) {
41
+ foreach ($db_data as $set) {
42
$candidate = Codepoint::getCached($set, $db);
43
if ($candidate->sensitivity->value > SENSITIVITY_LEVEL::RAISED->value) {
44
continue;
0 commit comments