Fix a couple of bugs related to posting comics.
darkmorford -
d30255be3d08
Not Reviewed
Show More
Add another comment
TODOs: 0 unresolved 0 Resolved
COMMENTS: 0 General 0 Inline
@@ -41,7 +41,8 if( $_POST ) {
41 41 // get image type and target extension
42 42 $imagedata = getimagesize($_FILES['comicFile']['tmp_name']);
43 43 $strip->media = $imagedata[2];
44 $fileext = $dbConnection->fetchColumn('SELECT extension FROM media_t WHERE id = ?', array($strip->media), array(PDO::PARAM_INT));
44 $fileext = $dbConnection->fetchColumn('SELECT extension FROM media_t WHERE id = ?', array($strip->media), 0, array(PDO::PARAM_INT));
45 var_dump($fileext);
45 46
46 47 if(strlen($fileext) < 3)
47 48 {
@@ -22,8 +22,8 class Strip
22 22 function insertstrip(&$strip) {
23 23 global $dbConnection;
24 24
25 $strip->book = ($strip->book == '') ? 'NULL' : (int)$strip->book;
26 $strip->page = ($strip->page == '') ? 'NULL' : (int)$strip->page;
25 $strip->book = ($strip->book == '') ? NULL : (int)$strip->book;
26 $strip->page = ($strip->page == '') ? NULL : (int)$strip->page;
27 27
28 28 $dbConnection->beginTransaction();
29 29 $newid = $dbConnection->fetchColumn('SELECT MAX(id) FROM strip') + 1;
Comments 0
You need to be logged in to leave comments. Login now