1 users online. Create an account or sign in to join them.Users

Announcement

Symphony's issue tracker has been moved to Github.

Issues are displayed here for reference only and cannot be created or edited.

Browse

Closed#412: Invalid argument supplied for foreach() when trying to removing myself

Was trying out Symphony what the “Developer” role does, then tried to remove the developer user which i was currently when logged in.

Steps to reproduce:

  1. Create a developer user
  2. Login as this developer user
  3. Go to the system -> author
  4. Remove yourself (e.g. the new developer user your currently logged in with)
  5. Observe the following:

Invalid argument supplied for foreach() /home/sjoerd/www/symphony/symphony/content/content.systemauthors.php line 112

107 ### 108 # Delegate: Delete 109 # Description: Prior to deleting an author. ID is provided. 110 //$ExtensionManager->notifyMembers(‘Delete’, getCurrentPage(), array(‘authorid’ => $authorid)); 111
112 foreach($checked as $authorid){ 113 $a = AuthorManager::fetchByID($authorid); 114 if(isobject($a) && $a->get(‘id’) != Administration::instance()->Author->get(‘id’)) AuthorManager::delete($authorid); 115 } 116

Although this bug is valid (and simple to fix), I’m more curious in the expected behaviour here.

Should you really be able to remove yourself?!

@sjoerdmulder, did you expect yourself to be removed? Or did you expect any error saying that you can’t remove yourself?

I think that not be able to remove yourself makes more sense.

This issue is closed.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details