-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uninitialized string offset: 0 at Node.php#290 #10262
Comments
GitMate.io thinks a possibly related issue is #6335 (Undefined offset: 2). |
@setar Do you mind to send this to us via pull request? Thanks a lot for finding it. |
sorry, I do not want to do a fork project to fix one line |
@setar Do you have any chance to debug this a bit? Where is the diff --git a/lib/private/Files/Node/Node.php b/lib/private/Files/Node/Node.php
index d2232624b9..3b6857e64f 100644
--- a/lib/private/Files/Node/Node.php
+++ b/lib/private/Files/Node/Node.php
@@ -284,6 +284,10 @@ class Node implements \OCP\Files\Node {
* @return string
*/
protected function normalizePath($path) {
+ if ($path === null) {
+ \OC::$server->getLogger()->logException(new \Exception(), ['app' => 'debug-empty-path']);
+ return '/';
+ }
if ($path === '' or $path === '/') {
return '/';
} This should help to log the stack trace. |
@setar no need to fork the project. :) Github makes this very easy to simply do it online:
And that’s all 🎉 |
Thanks, its new knowledge for me :) |
Hi, I can do the fix like @jancborchardt mentioned, but I haven't the knowledge in PHP. So I think it would be better if someone do the fix, who know want he do. |
I am seeing the same errors on 13.0.6 |
How do I make this change? under vi, it says it is a read only file. |
I see this on 14.0.1, fyi. |
I added a PR. Please review! |
Signed-off-by: Daniel Hansson daniel@hanssonit.se
Okay - we should not fix the symptoms but actually the cause. In the proposed way the cause is simply hidden. 🙈 |
Same problem here. Here one line raw data of my log file:
And here an image of my nextcloud log section: Note: I don't know what the other two error messages are about, but for now, just ignore them. (Or give me a hint where they come from, because they are really spamming my log file :) ) Server configuration detailOperating system: Linux 4.15.0-36-generic #39-Ubuntu SMP Mon Sep 24 16:19:09 UTC 2018 x86_64 Webserver: Apache/2.4.29 (Ubuntu) (fpm-fcgi) Database: pgsql PostgreSQL 10.5 (Ubuntu 10.5-0ubuntu0.18.04) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0, 64-bit PHP version: 7.2.10-0ubuntu0.18.04.1 Nextcloud version: 14.0.1 - 14.0.1.1 Updated from an older Nextcloud/ownCloud or fresh install: Freh install with github.com/nextcloud/vm script Where did you install Nextcloud from: unknown Signing statusArray List of activated apps
Configuration (config/config.php)
Are you using external storage, if yes which one: local/smb/sftp/... No Are you using encryption: No Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/... Webdav Client configurationBrowser: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0 |
@icewind1991 @rullzer looks suspicious. Any idea where this is coming from? Maybe @danielkesselberg wants to dig into this 😉 |
i did the upgrade from 13.0.6 to 13.0.7 on 20th of Octobre 18. Since then i see those message into the nc-log -->
|
Just a guess here, but I've seen numerous of errors when using the Full Text Search app. Not saying that it's the cause for this, but if everyone could confirm or deny if they use it or not maybe we have something to dig into. I use it. |
I also use it. |
@setar @Tanarri @amicheals @feutl Do you use Full Text Search? |
There are two apps about .. the "Full text search" and the "Full text search - Files" .. both are activated on my Cloud. I don't know if the " "#290" is indicating the Line number into the script .. when yes .. then it would be this function, which could be responsible for .. protected function normalizePath($path) {
|
We already know that it is this function where the error comes up. The question is, where does it come from. |
seems to be from above fulltextsearch: the path from the broadcasted event is null. But I wrote a fix for files_fulltextsearch (NC14) to ignore events when the path is null. Note: still would be interesting to understand why the path is null |
Please upgrade your files_fulltextsearch to 1.1.0 (NC14) |
i did the upgrade for: (i'm on NC 13.0.7) The Log still will be flooded .. Error PHP Uninitialized string offset: 0 at /var/www/html/nextcloud/lib/private/Files/Node/Node.php#290 3 minutes ago Thx for investigating .. |
Thx for the hint upgrading the app .. currently i'm running nc 13.0.7 .. and Version 1.1.0 is not compatible with version 1.3, i think ( Required Nextcloud versions | >=14.0.0,<15.0.0 ) |
As the version of the software you've reported this for has reached end of life, I will close this ticket. If this is still happening after an upgrade to the latest version, feel free to reopen |
Hei I am using NC 18.0.4. I currently activate ransomware recovery app and suddenly I get all those error messages: Uninitialized string offset: 0 at /var/www/html/nextcloud/lib/private/Files/Node/Node.php#307 |
I observed the same issue as @Wotisrv, also with NC 18.0.4 and ransomware recovery app. |
I second this, get my logfile spammed with these three errors:
|
Same problem as last three comments. NC 19.0.0 installed on Ubuntu 18.04 |
reopened in #23229 |
nextcloud 13.0.5 RC 2
error: Uninitialized string offset: 0 at Node.php#290
fix : nextcloud/lib/private/Files/Node/Node.php
in line 290 add !$path ||
fixed function:
The text was updated successfully, but these errors were encountered: