Warning of undefined setlimit in blogs

Bug #1326597 reported by Yuliya Bozhko
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Low
Yuliya Bozhko

Bug Description

Likely to be a regression from https://reviews.mahara.org/#/c/3349/

Tags: regression
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/3409

Changed in mahara:
assignee: nobody → Yuliya Bozhko (yuliya.bozhko)
importance: Undecided → Low
status: Triaged → In Progress
Revision history for this message
Ghada El-Zoghbi (ghada-z) wrote :

Hi Yuliya,

I'm trying to review the code. But, not sure how to generate this warning message in the first place.

What is the scenairo/conditions to get this warning? What is the text of the warning?

And, where does this warning appear (I'm assuming in /var/log/apache/error.log - or wherever the apache log is supposed to write to).

Thanks,
Ghada

Revision history for this message
Aaron Wells (u-aaronw) wrote :
Download full text (3.2 KiB)

Hi Ghada,

Sorry, it's a pretty vague description. We were talking about it in IRC.

To replicate:

1. Install latest from Mahara "master" 1.10dev

2. Create at least one journal entry

3. Create a page, and put a "Journal" block on the page.

4. Go to "Display page"

It generates this set of warnings:

[WAR] 31 (artefact/blog/lib.php:864) Undefined index: setlimit
Call stack (most recent first):

    log_message("Undefined index: setlimit", 8, true, true, "/home/aaronw/www/mahara/htdocs/artefact/blog/lib.p...", 864) at /home/aaronw/www/mahara/htdocs/lib/errors.php:433
    error(8, "Undefined index: setlimit", "/home/aaronw/www/mahara/htdocs/artefact/blog/lib.p...", 864, array(size 5)) at /home/aaronw/www/mahara/htdocs/artefact/blog/lib.php:864
    ArtefactTypeBlogPost::render_posts(array(size 5), "artefact:blog:viewposts.tpl", array(size 8), array(size 4)) at /home/aaronw/www/mahara/htdocs/artefact/blog/blocktype/blog/lib.php:75
    PluginBlocktypeBlog::render_instance(object(BlockInstance), true) at Unknown:0
    call_user_func_array(array(size 2), array(size 2)) at /home/aaronw/www/mahara/htdocs/lib/mahara.php:1562
    call_static_method("PluginBlocktypeBlog", "render_instance", object(BlockInstance), true) at /home/aaronw/www/mahara/htdocs/blocktype/lib.php:661
    BlockInstance->render_editing(false, false, true) at /home/aaronw/www/mahara/htdocs/blocktype/lib.php:587
    BlockInstance->instance_config_store(object(Pieform), array(size 12)) at Unknown:0
    call_user_func_array(array(size 2), array(size 2)) at /home/aaronw/www/mahara/htdocs/lib/pieforms/pieform.php:527
    Pieform->__construct(array(size 15)) at /home/aaronw/www/mahara/htdocs/blocktype/lib.php:939
    BlockInstance->build_configure_form() at /home/aaronw/www/mahara/htdocs/view/blocks.php:72

[WAR] 14 (artefact/blog/lib.php:864) Undefined index: setlimit
Call stack (most recent first):

    log_message("Undefined index: setlimit", 8, true, true, "/home/aaronw/www/mahara/htdocs/artefact/blog/lib.p...", 864) at /home/aaronw/www/mahara/htdocs/lib/errors.php:433
    error(8, "Undefined index: setlimit", "/home/aaronw/www/mahara/htdocs/artefact/blog/lib.p...", 864, array(size 5)) at /home/aaronw/www/mahara/htdocs/artefact/blog/lib.php:864
    ArtefactTypeBlogPost::render_posts(array(size 5), "artefact:blog:viewposts.tpl", array(size 8), array(size 4)) at /home/aaronw/www/mahara/htdocs/artefact/blog/blocktype/blog/lib.php:75
    PluginBlocktypeBlog::render_instance(object(BlockInstance)) at Unknown:0
    call_user_func_array(array(size 2), array(size 1)) at /home/aaronw/www/mahara/htdocs/lib/mahara.php:1562
    call_static_method("PluginBlocktypeBlog", "render_instance", object(BlockInstance)) at /home/aaronw/www/mahara/htdocs/blocktype/lib.php:763
    BlockInstance->render_viewing() at /home/aaronw/www/mahara/htdocs/lib/view.php:2017
    View->build_column(1, 1, false) at /home/aaronw/www/mahara/htdocs/lib/view.php:1974
    View->build_columns(1, false) at /home/aaronw/www/mahara/htdocs/lib/view.php:1959
    View->build_rows() at /home/aaronw/www/mahara/htdocs/view/view.php:346

If you have onscreen error reporting turned on (I think $cfg->productionmode = false does this by d...

Read more...

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/3409
Committed: http://gitorious.org/mahara/mahara/commit/072cd68b3e38446047c06dd6eb215f0902dcabd9
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 072cd68b3e38446047c06dd6eb215f0902dcabd9
Author: Yuliya Bozhko <email address hidden>
Date: Thu Jun 5 13:30:57 2014 +1200

Fix undefined variable warning in blogs (Bug #1326597)

Change-Id: Ia0e641b360f6d4e46d764cc97d0c3ccca6dce915
Signed-off-by: Yuliya Bozhko <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: none → 1.10.0
Aaron Wells (u-aaronw)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.