Author: chabotc
Date: Thu Jul 31 11:47:59 2008
New Revision: 681438
URL: http://svn.apache.org/viewvc?rev=681438&view=rev
Log:
SHINDIG-477 don't throw exception on missing certs
Modified:
incubator/shindig/trunk/php/src/gadgets/SigningFetcherFactory.php
Modified: incubator/shindig/trunk/php/src/gadgets/SigningFetcherFactory.php
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/gadgets/SigningFetcherFactory.php?rev=681438&r1=681437&r2=681438&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/gadgets/SigningFetcherFactory.php (original)
+++ incubator/shindig/trunk/php/src/gadgets/SigningFetcherFactory.php Thu Jul
31 11:47:59 2008
@@ -54,10 +54,12 @@
if (($cachedKey =
$cache->get(md5("RSA_PRIVATE_KEY_" . $this->keyName))) !== false) {
$rsa_private_key = $cachedKey;
} else {
- if (file_exists($keyFile) &&
is_readable($keyFile)) {
- $rsa_private_key =
@file_get_contents($keyFile);
- } else {
- throw new Exception("Could not
read keyfile ($keyFile), check the file name and permission");
+ if (file_exists($keyFile)) {
+ if (is_readable($keyFile)) {
+ $rsa_private_key =
@file_get_contents($keyFile);
+ } else {
+ throw new
Exception("Could not read keyfile ($keyFile), check the file name and
permission");
+ }
}
if (! $rsa_private_key) {
$rsa_private_key = "";