This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

"Deprecated: Assigning the return value..." error


  1. cybermatic
    Member

    Hi All,

    Since my host upgraded the version of PHP, I'm getting the following errors appearing above all my forms.

    Deprecated: Assigning the return value of new by reference is deprecated in /home/SITENAME/public_html/forms/includes/view-functions.php on line 1561

    Other lines affected are 1643, 1654, 1704, 1891, 1974, 1985, 2041, 2209, 2271

    Line 1561: $form = &new stdClass();
    1643: $element_options[$i] =& new stdClass();
    1654: $element[$j] =& new stdClass();
    1704: $element[$j] =& new stdClass();
    1891: $form =& new stdClass();
    1974: $element_options[$i] =& new stdClass();
    1985: $element[$j] =& new stdClass();
    2041: $element[$j] =& new stdClass();
    2209: $form =& new stdClass();
    2271: $form =& new stdClass();

    If I remove the & from each of the lines, the errors disappear. Will this affect anything else though?

    Thank you!

    Posted 13 years ago #
  2. yuniar

    You should be fine with that. If you are getting any deprecated error message again, I suggest to update your machform to v2.4, this version shouldn't have any deprecated code anymore.


    MachForm Founder

    Posted 13 years ago #

RSS feed for this topic

Reply