Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.
www.smarty.net
•
phpinsider.com
•
Forum Index
•
FAQ
•
Search
•
Memberlist
•
Profile
•
Log in to check your private messages
•
Register
•
Log in
Search found 4 matches
Smarty Forum Index
Author
Message
Topic:
how to use isset without generating notice ?
mmo
Replies:
5
Views:
8549
Forum:
General
Posted: Mon Dec 17, 2018 9:10 am Subject:
how to use isset without generating notice ?
test1:
{assign var='varname' value='nonexisting'}
{$varname}
is
{if isset(${$varname})}
set
{else}
not set
{/if}
output:
nonexisting is
( ! ) Notice: Undefined index: nonexisting in ...
...
Topic:
how to use isset without generating notice ?
mmo
Replies:
5
Views:
8549
Forum:
General
Posted: Thu Dec 13, 2018 7:01 am Subject:
how to use isset without generating notice ?
Why are you using such convoluted constructs to begin with?
Sadly it's the way I get the data. It's an old shop system, using multiple templates, and I can not change the basic data structure wit ...
Topic:
how to use isset without generating notice ?
mmo
Replies:
5
Views:
8549
Forum:
General
Posted: Wed Dec 12, 2018 7:42 am Subject:
workaround
It seems to use default like
{if ${$varname}|default:""}
is a usable workaround...
Topic:
how to use isset without generating notice ?
mmo
Replies:
5
Views:
8549
Forum:
General
Posted: Tue Dec 11, 2018 3:24 pm Subject:
how to use isset without generating notice ?
I get notices when using isset!
Simple example:
{assign var="varname" value="name_of_non_existing_variable"}
{$varname} is {if isset(${$varname})} set {else} not set {/if}
...
Page
1
of
1
All times are GMT
Jump to:
Select a forum
General
----------------
Announcements
Installation and Setup
FAQ (Frequently Asked Questions)
Testimonials
Showcase
Help Wanted (commercial)
User Supported Help
----------------
General
Tips and Tricks
Plugins
Add-ons
Frameworks
Article Discussions
Development
----------------
Smarty Development
Feature Requests
Bugs
Documentation
Smarty 3
International Discussions
----------------
Language: German
Language: French
Language: Portuguese
Language: Russian
Language: Spanish
Language: Italian
Language: Japanese
Language: Persian
Language: Polish
Language: Indonesian
Powered by
phpBB
© 2001, 2005 phpBB Group
Protected by
Anti-Spam ACP