A lot of notices get thrown in frontend
Author | Posts |
---|---|
May 5, 2015 at 1:39 pm 43103 | |
Nayem | A lot of notices get thrown when using the frontend version.
This happens since CPM_Project::getInstance()->get_projects() returns this:
This is later used in a foreach on row 316 in wedevs-project-manager-frontend-pro/frontend.php:
if ( !$project_obj->has_permission( $project ) ) { continue; }
Which obviously fails when $project == int (2) ('total_projects')
|
May 5, 2015 at 2:57 pm 43111 | |
Nayem | Hello Magnus, Actually i am not clear about your problem. Can you please describe me in more details? Thanks. |
May 5, 2015 at 4:24 pm 43125 | |
Magnus | When the [cpm] shortcode is rendering the project list a lot of notices gets thrown:
Here is the relevant stack trace:
The reason for this is that CPM_Project::getInstance()->get_projects() also include the array-index ‘total_projects’ in its return value, and later that record is passed in as the first argument in CPM_Project->has_permission. |
May 6, 2015 at 6:14 pm 43232 | |
Nayem | Hello, I have to discuss with our developer team. Please allow me some time. Thanks. |
May 7, 2015 at 12:32 pm 43300 | |
Nayem | Hello, Please do a fresh installation of this plugin. We did not get any error like this and did not get any complain before. You can check our demo- demo.wedevs.com/pm. After reinstalling the plugin if the problem remain then please let me know. Thanks. |