Skip to content

[stable20] Fix numeric folders throwing on markDirty - #23048

Merged
rullzer merged 1 commit into
stable20from
backport/23034/stable20
Sep 28, 2020
Merged

[stable20] Fix numeric folders throwing on markDirty#23048
rullzer merged 1 commit into
stable20from
backport/23034/stable20

Conversation

@backportbot-nextcloud

Copy link
Copy Markdown

backport of #23034

TypeError: strpos() expects parameter 1 to be string, int given
The problem is that in cacheNode() we strip of any slashes, so
a folder "0/" will be trimmed to "0" and be used as an array key.
Since PHP automatically casts numeric array keys to integers,
you afterwards get $nodePath as int(0). Since it's now a number,
the strpos() function does not accept it anymore. Simply casting
$nodePath to a string again in the foreach solves the issue
Signed-off-by: Joas Schilling <coding@schilljs.com>
@faily-bot

faily-botBot commented Sep 25, 2020

Copy link
Copy Markdown

🤖 beep boop beep 🤖

Here are the logs for the failed build:

Status of 33388: failure

samba

Show full log
There was 1 failure:
1) OCA\Files_External\Tests\Storage\SmbTest::testNotifyGetChanges
Actual changes are:
Array
(
[0] => OC\Files\Notify\Change Object
(
[type:OC\Files\Notify\Change:private] => 1
[path:OC\Files\Notify\Change:private] => newfile.txt
)
[1] => OC\Files\Notify\RenameChange Object
(
[targetPath:OC\Files\Notify\RenameChange:private] => renamed.txt
[type:OC\Files\Notify\Change:private] => 4
[path:OC\Files\Notify\Change:private] => newfile.txt
)
[2] => OC\Files\Notify\Change Object
(
[type:OC\Files\Notify\Change:private] => 2
[path:OC\Files\Notify\Change:private] => renamed.txt
)
)
Failed asserting that an array contains OC\Files\Notify\RenameChange Object &00000000206769c300000000567af607 (
'targetPath' => 'renamed.txt'
'type' => 4
'path' => 'newfile.txt'
).
/drone/src/apps/files_external/tests/Storage/SmbTest.php:126

mariadb10.1-php7.2

Show full log
There were 2 warnings:
1) Test\Files\ViewTest::testRenameFailDeleteTargetKeepSource
Trying to configure method "writeStream" which cannot be configured because it does not exist, has not been specified, is final, or is static
2) Test\Files\ViewTest::testCopyFailDeleteTargetKeepSource
Trying to configure method "writeStream" which cannot be configured because it does not exist, has not been specified, is final, or is static
--
There was 1 failure:
1) Test\Share20\DefaultShareProviderTest::testGetAccessListCurrentAccessRequired
Failed asserting that actual size 4 matches expected size 3.
/drone/src/tests/lib/Share20/DefaultShareProviderTest.php:2749

mysql8.0-php7.2

Show full log
There were 2 warnings:
1) Test\Files\ViewTest::testRenameFailDeleteTargetKeepSource
Trying to configure method "writeStream" which cannot be configured because it does not exist, has not been specified, is final, or is static
2) Test\Files\ViewTest::testCopyFailDeleteTargetKeepSource
Trying to configure method "writeStream" which cannot be configured because it does not exist, has not been specified, is final, or is static
--
There was 1 failure:
1) Test\Repair\CleanTagsTest::testRun
Assert tag entries count after cleaning tag entries
Failed asserting that '1' matches expected 2.
/drone/src/tests/lib/Repair/CleanTagsTest.php:125
/drone/src/tests/lib/Repair/CleanTagsTest.php:92

@rullzerrullzer mentioned this pull request Sep 28, 2020
@rullzer
rullzer merged commit 7630052 into stable20Sep 28, 2020
@rullzer
rullzer deleted the backport/23034/stable20 branch September 28, 2020 07:32
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@rullzer@nickvergessen