Author |
|
solkmaaker Senior Member

Joined: 28 June 2020
Online Status: Offline Posts: 189
|
Posted: 19 May 2025 at 12:57am | IP Logged
|
|
|
Hello Igor, can you please test this:
Create some document on your personal files.
Share this document with one teammate (read/write).
And then, let that teammate view or edit this shared document.
I'm getting error:
Code:
[Fatal error: Uncaught TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, bool given in /var/www/vendor/afterlogic/dav/lib/DAV/Server.php:407 Stack trace: #0 /var/www/vendor/afterlogic/dav/lib/DAV/Server.php(407): method_exists(false, 'init') #1 /var/www/modules/OfficeDocumentEditor/Module.php(951): Afterlogic\DAV\Server::getNodeForPath('files/shared/Ne...', 'user1@domain.com') #2 /var/www/modules/OfficeDocumentEditor/Module.php(970): Aurora\Modules\OfficeDocumentEditor\Module->getHistoryDir(Object(Aurora\Modules\Files\Classes\FileItem)) #3 /var/www/modules/OfficeDocumentEditor/Module.php(364): Aurora\Modules\OfficeDocumentEditor\Module->getHistory(Object(Aurora\Modules\Files\Classes\FileItem), '3c212038357b276...', 'https://test.po...') #4 [internal function]: Aurora\Modules\OfficeDocumentEditor\Module->EntryEditor() #5 /var/www/system/Router.php(103): call_user_func_array(Array, Array) #6 /var/www/system/Module/Manager.php(608): Aurora\System\Router->route('editor') #7 /var/www/system/Application.php(154): Aurora\System\Module\Manager->RunEntry('editor') #8 /var/www/system/Application.php(122): Aurora\System\Application->Route('editor') #9 /var/www/index.php(21): Aurora\System\Application::Start() #10 {main} thrown in /var/www/vendor/afterlogic/dav/lib/DAV/Server.php on line 407]
|
|
|
user1 is the user whom document was shared.
Aurora v9.8.1
PHP 8.2.28
Debian 12
|
Back to Top |
|
|
solkmaaker Senior Member

Joined: 28 June 2020
Online Status: Offline Posts: 189
|
Posted: 19 May 2025 at 1:19am | IP Logged
|
|
|
Update.
This does not happen with aurora 9.8.0, PHP 7.4.33, Debian 11
|
Back to Top |
|
|
Igor AfterLogic Support

Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6156
|
Posted: 26 May 2025 at 3:57am | IP Logged
|
|
|
Curious. I suppose this could indeed be related to specific PHP version used - our primary server runs PHP 8.1 and I didn't encounter such an issue there. I have asked our devs to take a look.
--
Regards,
Igor, Afterlogic
|
Back to Top |
|
|
solkmaaker Senior Member

Joined: 28 June 2020
Online Status: Offline Posts: 189
|
Posted: 22 July 2025 at 6:13am | IP Logged
|
|
|
Hi Igor
I must clarify things.
If user one shares document with user2 then editing this document is possible if user2 edits it in Personal folder.
But editing is impossible if user2 tries to edit this document from "Shared with me" folder.
Can you test this in your installation?
|
Back to Top |
|
|
solkmaaker Senior Member

Joined: 28 June 2020
Online Status: Offline Posts: 189
|
Posted: 23 July 2025 at 12:18am | IP Logged
|
|
|
It seems that method_exists() got stricter in PHP8
https://bugs.php.net/bug.php?id=79462
|
Back to Top |
|
|
solkmaaker Senior Member

Joined: 28 June 2020
Online Status: Offline Posts: 189
|
Posted: 23 July 2025 at 5:25am | IP Logged
|
|
|
Since method_exists() expects argument to be object or string and not bool, i added check to Server.php:
Code:
public static function getNodeForPath($path, $userPublicId = null)
{
$oNode = false;
$path = str_replace('//', '/', $path);
if (!isset($userPublicId)) {
$userPublicId = self::getUser();
}
$currentUser = self::getUser();
self::setUser($userPublicId);
try {
$oNode = self::getInstance()->tree->getNodeForPath($path);
if (is_object($oNode) || is_string($oNode)) {
if (method_exists($oNode, 'init')) {
$oNode->init();
}
}
} catch (\Exception $oEx) {
}
self::setUser($currentUser);
return $oNode;
}
|
|
|
|
Back to Top |
|
|