PKP Bugzilla – Bug 6552
error msg while adding author in editing submission metadata
Last modified: 2011-05-03 14:14:36 PDT
DB Error: Column 'paper_id' cannot be null
Solution is to add the missing "&" in ocs/classes/submission/form/MetadataForm.inc.php at line 217: - $author = new Author(); + $author = &new Author();
Renato, are you using PHP 4.x? In PHP 5.x, the "$var = &new ClassName" syntax (instantiation by reference) is deprecated. To work around this for both PHP4 and PHP5, use a conditional like the following: if (checkPhpVersion('5.0.0')) { // WARNING: This form needs $this in constructor $var = new ClassName(); } else { $var =& new ClassName(); } Can you confirm if this works for you?
Alec, yes we use PHP 4.4.9. I replaced $author = &new Author(); for the conditional statement if (checkPhpVersion('5.0.0')) { // WARNING: This form needs $this in constructor $author = new Author(); } else { $author =& new Author(); And it is working.
Created attachment 3504 [details] Patch against OCS 2.3.3-1
Fixed.