Parameter 1 to cms_module_Lang() expected to be a reference

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
demosthenes2k8
New Member
New Member
Posts: 3
Joined: Sun Jan 10, 2010 9:28 pm

Parameter 1 to cms_module_Lang() expected to be a reference

Post by demosthenes2k8 »

On my FIRST team's web site (http://chopshop166.com/cms) we're getting an error about 30 times:

Code: Select all

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /home/chopshop/public_html/cms/lib/classes/class.module.inc.php on line 1998
This is getting annoying, as it even appears in the administration pages.
The message appears quite a bit in both the header and the contents.
I don't think that a reinstall is really an option, as we have a lot of content on here.
The admin logs don't show anything really helpful-a couple of admins logging in and out, and one certain person (who I'm going to murder when I see him next) editing a lot of files. This doesn't explain why the errors would appear on the admin pages though, as none of them are admin files.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Parameter 1 to cms_module_Lang() expected to be a reference

Post by jmcgin51 »

need more information

what CMSMS version are you using?  what kind of server, etc.?  Check the sticky "read this first" threads, and see what kind of information we need to be able to help you.

Also, you can reinstall the CMSMS software without erasing your content.
demosthenes2k8
New Member
New Member
Posts: 3
Joined: Sun Jan 10, 2010 9:28 pm

Re: Parameter 1 to cms_module_Lang() expected to be a reference

Post by demosthenes2k8 »

Sorry, I'm stressing out because I have no idea how long the site's been like this...
We're running version 1.1 Samoa. I'm not sure what kind of server we use, the site's hosted somewhere in Georgia AFAIK. I really can't get much information on it, I'm not the team's webmaster. I have Admin power on the site, but no physical access and no clue how to reinstall it on the remote server...
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Parameter 1 to cms_module_Lang() expected to be a reference

Post by jmcgin51 »

well, as I'm sure you're aware from reading the "Read me first" stickies, versions older than 1.1 are not supported.  So, my first advice would be to back up the site, then update to 1.6.6 and see if the issue continues.  If it does, we can address it then.

It sounds like you don't have a lot of webmastering experience, so if you want this resolved quickly, you may want to post in the commercial forum for someone to help you get this fixed.

If you can afford for this to be a learning experience, then you need to contact your host to get your FTP or SSH login info.  You can then use the instructions in the CMSMS documentation to update your site, and if the issue continues, post your site information from the Admin panel (Site Admin > System Information).
demosthenes2k8
New Member
New Member
Posts: 3
Joined: Sun Jan 10, 2010 9:28 pm

Re: Parameter 1 to cms_module_Lang() expected to be a reference

Post by demosthenes2k8 »

Yeah, thanks. The only web site I've run so far is hosted on the server at my house, nothing I don't have access to.
I'll see if I can get the FTP information...
Roobarb
New Member
New Member
Posts: 3
Joined: Wed Apr 29, 2009 8:03 am

Re: Parameter 1 to cms_module_Lang() expected to be a reference

Post by Roobarb »

I ran into this error in CMSms 1.5.4 ("Carolina") after I upgraded to the latest version of XAMPP, which uses PHP 5.3.1. The problem occurs in function Lang(). Where it says:

Code: Select all

$args[0] = $this;
Change this line to:

Code: Select all

$args[0] =& $this;
That should stop the error you're seeing. This was fixed in revision 5857 on 3 August 2009, so the error will occur in versions of CMSms prior to 1.6.4 ("Moindou").

You may also want to set your error handling in the .htaccess file. This site explain more about that side of things.
mungo
Forum Members
Forum Members
Posts: 12
Joined: Thu Feb 08, 2007 6:16 pm

Re: Parameter 1 to cms_module_Lang() expected to be a reference

Post by mungo »

Thanks, your're a lifesaver. My host must have upgraded to PHP 5.3.1, your suggestion fixed my 1.5.3 "Arecibo" install.  ;D
sonderkar
New Member
New Member
Posts: 9
Joined: Mon Mar 16, 2009 8:58 am

Re: Parameter 1 to cms_module_Lang() expected to be a reference

Post by sonderkar »

Roobarb wrote: I ran into this error in CMSms 1.5.4 ("Carolina") after I upgraded to the latest version of XAMPP, which uses PHP 5.3.1. The problem occurs in function Lang(). Where it says:

Code: Select all

$args[0] = $this;
Change this line to:

Code: Select all

$args[0] =& $this;
That should stop the error you're seeing. This was fixed in revision 5857 on 3 August 2009, so the error will occur in versions of CMSms prior to 1.6.4 ("Moindou").

You may also want to set your error handling in the .htaccess file. This site explain more about that side of things.
I got had the same error, likely du to the same thing - That answer was SUPER thx alot!
Post Reply

Return to “CMSMS Core”