svn: /web/doc-editor/trunk/ index.php
| From: | Chan Ka Shing | Date: | Wed, 06 Jan 2010 10:10:01 +0000 |
| Subject: | svn: /web/doc-editor/trunk/ index.php | ||
| Groups: | php.doc.web | ||
| Request: | Send a blank email to doc-web+get-1479@lists.php.net to get a copy of this message | ||
mrkschan Wed, 06 Jan 2010 10:10:01 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=293173
Log:
add proper handler for invalid xmlid used in permlink access
Changed paths:
U web/doc-editor/trunk/index.php
Modified: web/doc-editor/trunk/index.php
===================================================================
--- web/doc-editor/trunk/index.php 2010-01-06 08:30:47 UTC (rev 293172)
+++ web/doc-editor/trunk/index.php 2010-01-06 10:10:01 UTC (rev 293173)
@@ -49,7 +49,11 @@
$r = RepositoryFetcher::getInstance()->getFileByXmlID($_lang, $xmlid);
- $directAccess = 'var directAccess =
{"lang":"'.$r->lang.'",
"path":"'.$r->path.'",
"name":"'.$r->name.'"};';
+ if (false == is_null($r)) {
+ $directAccess = 'var directAccess =
{"lang":"'.$r->lang.'",
"path":"'.$r->path.'",
"name":"'.$r->name.'"};';
+ } else {
+ $directAccess = 'var directAccess = false;';
+ }
} else {
$directAccess = 'var directAccess = false;';