Fix text test with '0' as input

This commit is contained in:
Simon Vieille 2018-02-07 20:00:27 +01:00
parent d1cf81aa1d
commit 9c0fa84d3b
No known key found for this signature in database
GPG Key ID: 919533E2B946EA10
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ $server->addMessageHandler('key', function (ConnectionInterface $from, array $da
$server->addMessageHandler('text', function (ConnectionInterface $from, array $data) use ($shell) {
$value = $data['value'] ?? null;
if (!empty($value)) {
if (trim($value) !== '') {
$shell->exec('xdotool type %s', escapeshellarg($value));
}
});