View Issue Details

IDProjectCategoryView StatusLast Update
13750Bug reports[All Projects] Survey designpublic2018-06-18 12:53
ReporterJohn_KAssigned To 
PrioritynoneSeverityminor 
Status assignedResolutionopen 
Product Version3.8.x 
Target VersionFixed in Version 
Summary13750: (PHP warning)Set template permission for this user- Error LS 3.8.1
DescriptionHi LS,
Attempting to Set template permission for new user, but keep getting a PHP error.

--1st error snip- Attached is full error page in html.
PHP warning
count(): Parameter must be an array or an object that implements Countable
G:\Apache24\htdocs\limesurvey\application\controllers\admin\useraction.php(726)
-----------------==========
714 return false;
715 }
716 }
717
718 private function _refreshtemplates()
719 {
720 $template_a = getTemplateList();
721 foreach ($template_a as $tp => $fullpath) {
722 // check for each folder if there is already an entry in the database
723 // if not create it with current user as creator (user with rights "create user" can assign template rights)
724 $result = Template::model()->findByPk($tp);
725
726 if (count($result) == 0) {
727 $post = new Template;
728 $post->folder = $tp;
729 $post->owner_id = Yii::app()->session['loginID'];
730
731 try {
732 $post->save();
733 } catch (Exception $ex) {
734 Yii::app()->setFlashMessage(
735 sprintf(
736 gT('Could not save theme %s: %s'),
737 $tp,
738 $ex->getMessage()

Steps To Reproduce1-Log in to LS
2-Click on 'Set template permission for this user' icon, to set template perms.
I Get this debug error.
========
Additional InformationI am able to set 'Set global permission for this user' but
Not 'Set template permission for this user'
TagsNo tags attached.
Complete LimeSurvey version number (& build)Version 3.8.1+180524
I will donate to the project if issue is resolvedNo
BrowserChrome, Edge, IE11
Database & DB-VersionMS SQL Server 2014 SP1(64bit)
Operating System (Server)Windows Server 2012 r2(64bit)
Webserver software & versionApache 2.4.33(64bit)
PHP VersionPHP 7.2.5(64bit)

Activities

Issue History

Date Modified Username Field Change
2018-06-08 01:01 John_K New Issue
2018-06-08 01:01 John_K File Added: PHP warning(Set template permission for this user- Error LS 3.8.1).htm
2018-06-18 12:53 LouisGac Assigned To => dominikvitt
2018-06-18 12:53 LouisGac Status new => assigned
2018-06-18 12:53 LouisGac Assigned To dominikvitt =>