CMSForms

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
devera
Forum Members
Forum Members
Posts: 22
Joined: Sun Aug 29, 2010 7:38 am

CMSForms

Post by devera »

When I install the CMSForm module (need it fot twitter) I get these warnings:

Code: Select all

Warning: Call-time pass-by-reference has been deprecated in /mnt/web1/40/08/51653808/htdocs/GI/CMSMS/modules/CMSForms/lib/classes/CMSForm.class.php on line 149
 
Warning: Call-time pass-by-reference has been deprecated in /mnt/web1/40/08/51653808/htdocs/GI/CMSMS/modules/CMSForms/lib/classes/CMSFormWidget.class.php on line 339
 
Warning: Call-time pass-by-reference has been deprecated in /mnt/web1/40/08/51653808/htdocs/GI/CMSMS/modules/CMSForms/lib/classes/CMSFormWidget.class.php on line 751
 
Warning: Call-time pass-by-reference has been deprecated in /mnt/web1/40/08/51653808/htdocs/GI/CMSMS/modules/CMSForms/lib/classes/CMSFormWidget.class.php on line 757
The code @ the lines is:

Code: Select all

[b]Warning1:[/b]
public function setWidget($name,$type,$settings = array())
	{
		$widget = new CMSFormWidget(&$this,$this->id,$this->module_name,$name,$type,$settings);
		if ($type == 'hidden')
		{
			$this->hidden_widgets[$name] = $widget;
		}
		elseif ($type == 'file')
		{
			$this->setMultipartForm(); // If we add files, we have to be posted multipart forms...
			$this->widgets[$name] = $widget;
		}
		else
		{
			$this->widgets[$name] = $widget;
		}
	}

[b]Warning 2:[/b]
protected function validate()
	{
		if (isset($this->settings['validators']) && is_array($this->settings['validators']))
		{
			//var_dump($this->settings['validators']);
			// CHANGE THAT
			
			foreach ($this->settings['validators'] as $validator => $value)
			{
				$validate = new CMSFormValidator(&$this,$validator,$value);
				try
				{
					if($validate->check() === false) $this->is_valid = false;
				}
				catch(Exception $e)
				{
					$this->setError($e->getMessage(), 'form error');
				}
				
			}
		}
	}
[b]Warning 3 & 4:[/b]
$list = array();
		foreach($items as $key => $item)
		{
			if (is_array($item))
			{
				$list[] = array('label' => '<strong>' . $key . '</strong>', 'input' => '');
	
				foreach($item as $key2 => $entry)
				{
					 self::generateExpandedList(&$list, $id, $entry, $name, $key2, $selecteditems, $multiple, $addttext);
				}
				
			}
			else
			{
				self::generateExpandedList(&$list, $id, $item, $name, $key, $selecteditems, $multiple, $addttext);
			}
		}
Any1 knows how to fix this? Thanks allready

CMS version 1.9.1
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: CMSForms

Post by Dr.CSS »

You may want to try upgrading to CMSMS 1.9.2 first to see if it helps...
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: CMSForms

Post by calguy1000 »

Disable E_DEPRECATED messages.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
devera
Forum Members
Forum Members
Posts: 22
Joined: Sun Aug 29, 2010 7:38 am

Re: CMSForms

Post by devera »

calguy1000 wrote: Disable E_DEPRECATED messages.
And how do i do that?
Coldman
Power Poster
Power Poster
Posts: 318
Joined: Sun Jun 22, 2008 5:33 am

Re: CMSForms

Post by Coldman »

Hi devera

Read this thread about E_DEPRECATED http://forum.cmsmadesimple.org/index.php?topic=43035
Important Code of Conduct
Why don't use CMSMS Docs or search?
Do you read Help?
Admin for Swedish Translations Team
Moderator Swedish Forum
After your problem is solved, push the green button
devera
Forum Members
Forum Members
Posts: 22
Joined: Sun Aug 29, 2010 7:38 am

Re: CMSForms

Post by devera »

Both solutions didn't work.
When i install the CMSforms module, my showtime also stops working.
Coldman
Power Poster
Power Poster
Posts: 318
Joined: Sun Jun 22, 2008 5:33 am

Re: CMSForms

Post by Coldman »

Dr.CSS wrote: You may want to try upgrading to CMSMS 1.9.2 first to see if it helps...
Did you upgrade to 1.9.2 as Dr. CSS suggested?
Important Code of Conduct
Why don't use CMSMS Docs or search?
Do you read Help?
Admin for Swedish Translations Team
Moderator Swedish Forum
After your problem is solved, push the green button
devera
Forum Members
Forum Members
Posts: 22
Joined: Sun Aug 29, 2010 7:38 am

Re: CMSForms

Post by devera »

Yes is did, some errors are gone that I did have before but still the "Call_time Pass_by_reference" warnings are there
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: CMSForms

Post by Dr.CSS »

Now make sure all extra module are up to date, extensions > Module Manager...
MTX
New Member
New Member
Posts: 2
Joined: Mon May 03, 2010 12:28 pm

Re: CMSForms

Post by MTX »

I did have the same errors. What I did to get rid of them was the following:
In the CMSForm.class.php and CMSFormValidator.class.php and CMSFormWidget.class.php in the lib directory I searched for the "&$" and replaced that with "$".
That did the trick for me.

Did some investigations on Google and as far as I understood this warning is caused by an old (php 4) style of method call using a reference.

Hope this helps!
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: CMSForms

Post by Dr.CSS »

Need to file a bug report in forge for this module...
MTX
New Member
New Member
Posts: 2
Joined: Mon May 03, 2010 12:28 pm

Re: CMSForms

Post by MTX »

@Dr.CSS, the bug report is already there, see http://dev.cmsmadesimple.org/bug/view/6031
I don't know how to put this solution to the author.
Locked

Return to “Modules/Add-Ons”