Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2661032
D25154.1732978854.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
D25154.1732978854.diff
View Options
diff --git a/src/applications/conpherence/query/ConpherenceThreadQuery.php b/src/applications/conpherence/query/ConpherenceThreadQuery.php
--- a/src/applications/conpherence/query/ConpherenceThreadQuery.php
+++ b/src/applications/conpherence/query/ConpherenceThreadQuery.php
@@ -135,7 +135,8 @@
}
protected function buildGroupClause(AphrontDatabaseConnection $conn_r) {
- if ($this->participantPHIDs !== null || strlen($this->fulltext)) {
+ if ($this->participantPHIDs !== null ||
+ phutil_nonempty_string($this->fulltext)) {
return qsprintf($conn_r, 'GROUP BY thread.id');
} else {
return $this->buildApplicationSearchGroupClause($conn_r);
@@ -152,7 +153,7 @@
id(new ConpherenceParticipant())->getTableName());
}
- if (strlen($this->fulltext)) {
+ if (phutil_nonempty_string($this->fulltext)) {
$joins[] = qsprintf(
$conn,
'JOIN %T idx ON idx.threadPHID = thread.phid',
@@ -234,7 +235,7 @@
$this->participantPHIDs);
}
- if (strlen($this->fulltext)) {
+ if (phutil_nonempty_string($this->fulltext)) {
$where[] = qsprintf(
$conn,
'MATCH(idx.corpus) AGAINST (%s IN BOOLEAN MODE)',
diff --git a/src/applications/conpherence/query/ConpherenceThreadSearchEngine.php b/src/applications/conpherence/query/ConpherenceThreadSearchEngine.php
--- a/src/applications/conpherence/query/ConpherenceThreadSearchEngine.php
+++ b/src/applications/conpherence/query/ConpherenceThreadSearchEngine.php
@@ -106,7 +106,7 @@
$engines = array();
$fulltext = $query->getParameter('fulltext');
- if (strlen($fulltext) && $conpherences) {
+ if (phutil_nonempty_string($fulltext) && $conpherences) {
$context = $this->loadContextMessages($conpherences, $fulltext);
$author_phids = array();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 30, 15:00 (20 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1001066
Default Alt Text
D25154.1732978854.diff (1 KB)
Attached To
Mode
D25154: Fix PHP 8.1 "strlen(null)" exceptions which block rendering the Conpherence page
Attached
Detach File
Event Timeline
Log In to Comment