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
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

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: No registered users and 1 guest