diff --git a/core/user.class.php b/core/user.class.php index 6d73c5c0..3e375a8d 100644 --- a/core/user.class.php +++ b/core/user.class.php @@ -221,9 +221,15 @@ class User { */ public function set_password(/*string*/ $password) { global $database; - $this->passhash = password_hash($password, PASSWORD_BCRYPT); - $database->Execute("UPDATE users SET pass=:hash WHERE id=:id", array("hash"=>$this->passhash, "id"=>$this->id)); - log_info("core-user", 'Set password for '.$this->name); + $hash = password_hash($password, PASSWORD_BCRYPT); + if(is_string($hash)) { + $this->passhash = $hash; + $database->Execute("UPDATE users SET pass=:hash WHERE id=:id", array("hash"=>$this->passhash, "id"=>$this->id)); + log_info("core-user", 'Set password for '.$this->name); + } + else { + throw new SCoreException("Failed to hash password"); + } } /** diff --git a/ext/autocomplete/script.js b/ext/autocomplete/script.js index 87ccbf93..301878ea 100644 --- a/ext/autocomplete/script.js +++ b/ext/autocomplete/script.js @@ -23,7 +23,7 @@ $(function(){ return { label : item + ' ('+count+')', value : item - } + }; })); }, error : function (request, status, error) { @@ -55,4 +55,4 @@ $(function(){ } } }); -}); \ No newline at end of file +}); diff --git a/ext/handle_video/theme.php b/ext/handle_video/theme.php index 774ea55a..1699f7cd 100644 --- a/ext/handle_video/theme.php +++ b/ext/handle_video/theme.php @@ -2,7 +2,6 @@ class VideoFileHandlerTheme extends Themelet { public function display_image(Page $page, Image $image) { - $data_href = get_base_href(); $ilink = $image->get_image_link(); $thumb_url = make_http($image->get_thumb_link()); //used as fallback image $ext = strtolower($image->get_ext());