Jump to:
| Project: | CKEditor - WYSIWYG HTML editor |
| Version: | 6.x-1.8 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
On a user edit page the error Trying to get property of non-object in fckeditor_user_delegate() is given when a user with with 'access ckeditor' permissions is editing a user without this permission or when a profile has not been assigned to a role.
This is caused because the following line in ckeditor.user.inc checks access of the wrong user:
<?php
if ($type == 'form' && $category == 'account' && user_access('access fckeditor')) {
?>It should be:
<?php
if ($type == 'form' && $category == 'account' && user_access('access fckeditor', $user)) {
?>Furthermore, the $profile variable should be checked before it is used, because it can be false.
Please also see #1398900: Trying to get property of non-object when editing user with no FCKeditor access and commit 182f35d22 for the equivalent FCKeditor bug. I think this bug is also present in CKEditor 6.x-1.8 in the same form and CKEditor 7.x-1.x in a slightly different form, I suspect.
Comments
#1
Please take a look at this quick bug fix, it is still present.
#2
@Jorrit, really thx for report it and solution for this bug.
I commit fix to GIT (diff).
Greetings
#3
Automatically closed -- issue fixed for 2 weeks with no activity.