-
Notifications
You must be signed in to change notification settings - Fork 2.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
Undefined offset: 3 at \/Users\/lreschke\/Programming\/core\/apps\/files\/controller\/apicontroller.php#105" #14277
Comments
Strange, I haven't seen this error before. Need to check if it happens on stable8 too. |
I wonder if you have broken/bad entries in your DB that would make If you still have that setup, can you do the following: |
Steps to reproduce:
DB: sqlite> select * from oc_vcategory;
id|uid|type|category
1|admin|files|_$!<Favorite>!$_ sqlite> select * from oc_filecache fc, oc_vcategory_to_object t where t.categoryid=1 and t.objid=fc.fileid;
fileid|storage|path|path_hash|parent|name|mimetype|mimepart|size|mtime|storage_mtime|encrypted|unencrypted_size|etag|permissions|objid|categoryid|type
4|1|files/welcome.txt|c49a144e772727f51b75705170e88a43|3|welcome.txt|4|3|163|1424130986|1424130986|0|0|0cf0d17aca263970f182d8775e72e138|27|4|1|files |
Huh... that seems to be correct. Unless the format of the path has changed. I'll see if I can reproduce it and debug inside. Do you see the file shown correctly in the favorites list ? |
Yes. |
Okay got it... there is a leading slash in the path: "/user/files/thirdpart" becomes "", "user", "files" and "thirdpart" ... Let me find out whether this was introduced recently. |
🙈 |
Seems I always missed it... If the favorite file is in the root, then So basically this magically still worked properly. Let's use your PR that fixes the warning then. |
This checks if the offset exists before accessing it and also adds unit tests to this function which would have catched this before 🙈 Fixes #14277
On current master when going to the Favourites sidebar:
@PVince81
The text was updated successfully, but these errors were encountered: