Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit 36d7475

Browse files
author
Flo Faber
committed
Fixed MPD_CMD_READ_LIST_SINGLE for real this time
1 parent af85f7d commit 36d7475

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Socket.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ protected function parse(array $lines, int $mode = MPD_CMD_READ_NORMAL, array $l
542542

543543
// If we only parse a list with a single possible key make sure $first_key is already set OR $first_key equals the current key.
544544
// If true push the value to the result array. That way we eliminate the risk of funky responses if this mode is used incorrectly.
545-
}elseif($mode === MPD_CMD_READ_LIST_SINGLE){
545+
}elseif($mode === MPD_CMD_READ_LIST_SINGLE && ($first_key === $k || in_array($k, $list_starts))){
546546
$b[] = $v;
547547
}
548548

0 commit comments

Comments
 (0)