pdo: set warnings
This commit is contained in:
parent
c39ee27235
commit
2e46b434da
|
@ -274,7 +274,7 @@ class Article extends Handler_Protected {
|
|||
$tags_str = db_escape_string($_REQUEST["tags_str"]);
|
||||
$tags = array_unique(trim_array(explode(",", $tags_str)));
|
||||
|
||||
db_query("BEGIN");
|
||||
$this->pdo->beginTransaction();
|
||||
|
||||
$result = db_query("SELECT int_id FROM ttrss_user_entries WHERE
|
||||
ref_id = '$id' AND owner_uid = '".$_SESSION["uid"]."' LIMIT 1");
|
||||
|
@ -319,7 +319,7 @@ class Article extends Handler_Protected {
|
|||
AND owner_uid = " . $_SESSION["uid"]);
|
||||
}
|
||||
|
||||
db_query("COMMIT");
|
||||
$this->pdo->commit();
|
||||
|
||||
$tags = Article::get_article_tags($id);
|
||||
$tags_str = $this->format_tags_string($tags, $id);
|
||||
|
|
|
@ -31,6 +31,8 @@ class Db implements IDb {
|
|||
DB_USER,
|
||||
DB_PASS);
|
||||
|
||||
$this->pdo->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING );
|
||||
|
||||
if (!$this->pdo) {
|
||||
print("Error connecting via PDO.");
|
||||
exit(101);
|
||||
|
|
Loading…
Reference in New Issue