Skip to content

Fix an inaccurate copy-pasted comment and the concat() PHPDoc - #10334

Open
Avicennasis wants to merge 3 commits into
roundcube:masterfrom
Avicennasis:docs/fix-typos
Open

Avicennasis wants to merge 3 commits into
roundcube:masterfrom
Avicennasis:docs/fix-typos

Conversation

@Avicennasis

Copy link
Copy Markdown

Summary

Two small correctness fixes in comments/PHPDoc. Base branch is master.

  • program/actions/mail/mark.php:119 - // refresh saved search set after moving some messages -> // refresh saved search set after marking some messages as deleted

    Nothing is moved in the mark action; it only sets and clears IMAP flags. The branch this comment sits in is $flag == 'DELETED' && $skip_deleted, i.e. messages disappearing from the list because they were flagged deleted. The identical line exists verbatim in program/actions/mail/move.php:87, where it is accurate, which is where it was copied from.

  • program/lib/Roundcube/db/mysql.php:44 - @return string ...$args Values to concatenate -> @param string ...$args Values to concatenate plus a bare @return string

    ...$args is the parameter list, not the return value; the method returns the CONCAT(...) string. The new layout matches the @param / blank / @return shape already used elsewhere in the same file (e.g. dsn_string() at lines 59-61).

Two related occurrences I deliberately did not touch

Say the word and I will fold either in:

  • program/actions/mail/delete.php:71 carries the same copy-pasted "after moving" comment.
  • program/lib/Roundcube/rcube_db.php:1088 - the abstract parent of the method above - has the same @return string ...$args mistake.

No functional changes: comments and PHPDoc only. No CHANGELOG entry, since neither change is noteworthy for users, admins or plugin authors.

@alecpl

alecpl commented Sep 19, 2026

Copy link
Copy Markdown
Member

Will you fix the CI issues?

The variadic $args can be a single array (see the is_array check below),
so typing it as string broke PHPStan's contravariance check against the
untyped parent and made the is_array() check look like dead code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants