Index: openacs-4/packages/acs-subsite/www/user/portrait/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/user/portrait/index.tcl,v diff -u -r1.15.2.3 -r1.15.2.4 --- openacs-4/packages/acs-subsite/www/user/portrait/index.tcl 1 Sep 2022 12:28:22 -0000 1.15.2.3 +++ openacs-4/packages/acs-subsite/www/user/portrait/index.tcl 1 Sep 2022 12:31:27 -0000 1.15.2.4 @@ -79,13 +79,15 @@ # we have revision_id now -if {[catch {db_1row get_picture_info " -select i.width, i.height, cr.title, cr.description, cr.publish_date -from images i, cr_revisions cr -where i.image_id = cr.revision_id -and image_id = :revision_id -"} errmsg]} { - # There was an error obtaining the picture information +if {![db_0or1row get_picture_info { + select i.width, i.height, cr.title, cr.description, cr.publish_date + from images i, cr_revisions cr + where i.image_id = cr.revision_id + and image_id = :revision_id +}]} { + # + # We found no profile picture. + # set context [list "Invalid Picture"] set return_code "no_portrait_info" ad_return_template