Skip to content

Conversation

@backportbot-nextcloud
Copy link

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 <[email protected]>
@faily-bot
Copy link

faily-bot bot commented Sep 25, 2020

🤖 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

@rullzer rullzer mentioned this pull request Sep 28, 2020
@rullzer rullzer merged commit 7630052 into stable20 Sep 28, 2020
@rullzer rullzer deleted the backport/23034/stable20 branch September 28, 2020 07:32
Sign up for free to 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.

3 participants