Re: SMF PHP error... Am I missing something subtle in the PHP language syntax?



*** William Krick escribió/wrote (Mon, 29 Sep 2008 11:49:14 -0700 (PDT)):
// generates errors
$tboard = $context['linktree'][2]['name'];
$tboard = empty($tboard)?'':' - '.$tboard;

// no errors
$tboard = empty($context['linktree'][2]['name'])?'':' - '.
$context['linktree'][2]['name'];

The key point is that empty($foo) does not trigger a notice when $foo is
not set.

--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor en cubitos: http://www.demogracia.com
--
.



Relevant Pages

  • Re: help with triggers and mutating tables
    ... create table foo ( ... type array is table of foo%rowtype index by binary_integer; ... create or replace trigger foo_au_trigger ... if (foo_pkg.deleted(fooPtCnt).x ...
    (comp.databases.oracle.misc)
  • Re: capture and save running sql query to database table (for logging)
    ... since a trigger is invoked only on INSERT/UPDATE/DELETE you cannot audit SELECT statements. ... keycol INT PRIMARY KEY, ... INSERT INTO Foo VALUES ...
    (comp.databases.ms-sqlserver)
  • Re: Kbuild + Cross compiling
    ... and it is taking forever due to continual full-rebuilds. ... diff -u foo mm/.slab.o.cmd ... If diff detects any difference then you know why and need to find out ... and which will trigger with make 3.82-cvs also. ...
    (Linux-Kernel)
  • how to monitor table changes
    ... create table foo2,foo_int int, ... Create trigger mytrigg on foo ... insert into foo select 'joe' union all select 'rob' union ...
    (microsoft.public.sqlserver.security)
  • Re: Posting without an email address
    ... Between saving the world and having a spot of tea Blinky the Shark said ... trigger quite yet. ... And if my sense of humor has been diminished ...
    (news.software.readers)