Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Passive errors?

New Here ,
Jul 11, 2008 Jul 11, 2008
In PHP, I know that if you echo or display a variable that has not been defined, it will just run through it and display nothing. However, in CF, I get an error when that happens. If have about 20 variables that need to be displayed and need to know if there's a way to have the code say, if these variables are not defined, just ignore them. Possible? Thanks!

Ryan
168
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 11, 2008 Jul 11, 2008
LATEST
no, cf will always throw an error if you try to use an un-defined variable.
you can use <cfparam> to give your vars default values - if a var is not
defined, it will be set to the value you specify; if it is defined, it
will not be changed.

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources