#526 Unitialised variable reference in config.php

PHP_error
closed
5
2012-10-11
2006-02-25
Matt Brown
No

The guessing_lang function makes a reference to a
potentially uninitialised variable ($accept) on line
156 when the users browser does not send an
Accept-Language header (wget is an exampel of a browser
that does not do this).

The attached patch initialises the $accept variable to
false to avoid this problem.

This patch can be found as r55 in the WLUG svn
repository at:
http://svn.wlug.org.nz/viewcvs?root=wiki&rev=55&view=rev

Discussion

  • Matt Brown

    Matt Brown - 2006-02-25

    Always initialise variables

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks