You are viewing the PKP Support Forum | PKP Home Wiki

Fix for UserRegistrationForm.inc.php

Are you responsible for making OCS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, John

Forum rules
What to do if you have a technical problem with OCS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved. Please note that this FAQ is OJS-centric, but most issues are applicable to both platforms.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OCS Conference Support and Discussion subforum; if you have a development question, try the OCS Development subforum.

Fix for UserRegistrationForm.inc.php

Postby mazzo » Thu Dec 20, 2007 7:17 am

If a new user tries to register, we got following error:

Warning: Invalid argument supplied for foreach() in /usr/local/info-sys/www/cc/classes/registration/form/UserRegistrationForm.inc.php on line 194

Warning: session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent in /usr/local/info-sys/www/cc/classes/session/SessionManager.inc.php on line 209

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/info-sys/www/cc/classes/registration/form/UserRegistrationForm.inc.php:194) in /usr/local/info-sys/www/cc/classes/template/TemplateManager.inc.php on line 250

This may be fixed as follows:

--- UserRegistrationForm.inc.php.ori 2007-12-07 14:22:34.975188000 +0100
+++ UserRegistrationForm.inc.php 2007-12-07 14:34:11.872593000 +0100
@@ -153,6 +153,10 @@


+ if ($this->getData('userLocales') == null || !is_array($this->getData('userLocales'))) {
+ $this->setData('userLocales', array());
+ }
// If registration type requires it, membership is provided
$registrationTypeDao = &DAORegistry::getDAO('RegistrationTypeDAO');
$needMembership = $registrationTypeDao->getRegistrationTypeMembership($this->getData('typeId'));

Regards Roberto
Posts: 4
Joined: Wed Dec 19, 2007 4:57 am

Return to OCS Technical Support

Who is online

Users browsing this forum: Bing [Bot] and 3 guests