Permalink
Browse files

Only variables should be passed by reference. If preview is not rende…

…red, serve a 404 image.
  • Loading branch information...
1 parent c009851 commit 888f61a6a7be54399dc798ccc685a11d6c2d7548 @skinkie skinkie committed Jan 15, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 template-toevoegen.php
View
@@ -26,12 +26,15 @@
$dbh = new PDO(DATABASE, DB_USER, DB_PASSWORD);
if (active('category', 'newtemplate') != '') {
+ $param_newtemplate = active('category', 'newtemplate');
$stmt = $dbh->prepare('SELECT title FROM content_category WHERE content_category.id=:contentcategoryid');
- $stmt->bindParam(':contentcategoryid', active('category', 'newtemplate'), PDO::PARAM_INT);
+ $stmt->bindParam(':contentcategoryid', $param_newtemplate, PDO::PARAM_INT);
$stmt->execute();
$qresult = $stmt->fetchAll();
}
+ $preview = '404';
+
if (isset($qresult[0])) {
$preview = checkandpreview($safebox=1, $width=269, $height=200, $format='png',

0 comments on commit 888f61a

Please sign in to comment.