Moodle
  1. Moodle
  2. MDL-25575

Trying to get property of non-object notice when editing block

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.2
    • Component/s: Blocks, Libraries
    • Labels:
    • Rank:
      1022

      Description

      To reproduce on http://demo.moodle.net/ (upgraded to 2.0 from 1.9.10)

      1. Turn editing on in a course or front page
      2. Attempt to configure a block or assign roles for the block

      With developer debugging turned on, the following notice is displayed:

      Notice: Trying to get property of non-object in /html/lib/accesslib.php on line 2360
      Notice: Trying to get property of non-object in /html/lib/accesslib.php on line 2364

        Activity

        Hide
        Helen Foster added a comment -

        Just checked and found http://qa.moodle.net unaffected by this issue. Please change to MDLSITES issue if the demo site only is affected.

        Show
        Helen Foster added a comment - Just checked and found http://qa.moodle.net unaffected by this issue. Please change to MDLSITES issue if the demo site only is affected.
        Hide
        Dan Poltawski added a comment -

        I've seen other reports of sites with this problem. It would be good to analyse the data to work out why this is happening.

        Show
        Dan Poltawski added a comment - I've seen other reports of sites with this problem. It would be good to analyse the data to work out why this is happening.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Attached complete stack trace of this in my site:

        Notice: Trying to get property of non-object in /Users/stronk7/git_moodle/moodle/lib/accesslib.php on line 2355
        Call Stack
        #	Time	Memory	Function	Location
        1	0.0008	94472	{main}( )	../index.php:0
        2	0.1863	6920552	bootstrap_renderer->header( )	../index.php:89
        3	0.1863	6921032	bootstrap_renderer->__call( )	../setuplib.php:0
        4	0.1882	7046888	call_user_func_array ( )	../setuplib.php:1203
        5	0.1882	7047392	core_renderer->header( )	../setuplib.php:0
        6	0.1882	7051344	moodle_page->set_state( )	../outputrenderers.php:600
        7	0.1882	7052344	moodle_page->starting_output( )	../pagelib.php:702
        8	0.1913	7118616	block_manager->process_url_actions( )	../pagelib.php:1184
        9	0.1915	7126632	block_manager->process_url_edit( )	../blocklib.php:1040
        10	0.2236	8623376	moodle_page->set_title( )	../blocklib.php:1267
        11	0.2236	8623752	format_string( )	../pagelib.php:896
        12	0.2238	8628232	performance_measuring_filter_manager->filter_string( )	../weblib.php:1251
        13	0.2238	8628688	filter_manager->filter_string( )	../filterlib.php:305
        14	0.2238	8629152	filter_manager->get_string_filters( )	../filterlib.php:208
        15	0.2238	8629712	filter_manager->load_filters( )	../filterlib.php:180
        16	0.2250	8635024	performance_measuring_filter_manager->make_filter_object( )	../filterlib.php:106
        17	0.2250	8635608	filter_manager->make_filter_object( )	../filterlib.php:284
        18	0.2251	8638320	legacy_filter->__construct( )	../filterlib.php:141
        19	0.2251	8638968	get_courseid_from_context( )	../filterlib.php:393
        20	0.2252	8643048	get_courseid_from_context( )	../accesslib.php:2373
        
        
        Notice: Trying to get property of non-object in /Users/stronk7/git_moodle/moodle/lib/accesslib.php on line 2359
        Call Stack
        #	Time	Memory	Function	Location
        1	0.0008	94472	{main}( )	../index.php:0
        2	0.1863	6920552	bootstrap_renderer->header( )	../index.php:89
        3	0.1863	6921032	bootstrap_renderer->__call( )	../setuplib.php:0
        4	0.1882	7046888	call_user_func_array ( )	../setuplib.php:1203
        5	0.1882	7047392	core_renderer->header( )	../setuplib.php:0
        6	0.1882	7051344	moodle_page->set_state( )	../outputrenderers.php:600
        7	0.1882	7052344	moodle_page->starting_output( )	../pagelib.php:702
        8	0.1913	7118616	block_manager->process_url_actions( )	../pagelib.php:1184
        9	0.1915	7126632	block_manager->process_url_edit( )	../blocklib.php:1040
        10	0.2236	8623376	moodle_page->set_title( )	../blocklib.php:1267
        11	0.2236	8623752	format_string( )	../pagelib.php:896
        12	0.2238	8628232	performance_measuring_filter_manager->filter_string( )	../weblib.php:1251
        13	0.2238	8628688	filter_manager->filter_string( )	../filterlib.php:305
        14	0.2238	8629152	filter_manager->get_string_filters( )	../filterlib.php:208
        15	0.2238	8629712	filter_manager->load_filters( )	../filterlib.php:180
        16	0.2250	8635024	performance_measuring_filter_manager->make_filter_object( )	../filterlib.php:106
        17	0.2250	8635608	filter_manager->make_filter_object( )	../filterlib.php:284
        18	0.2251	8638320	legacy_filter->__construct( )	../filterlib.php:141
        19	0.2251	8638968	get_courseid_from_context( )	../filterlib.php:393
        20	0.2252	8643048	get_courseid_from_context( )	../accesslib.php:2373
        
        Show
        Eloy Lafuente (stronk7) added a comment - Attached complete stack trace of this in my site: Notice: Trying to get property of non-object in /Users/stronk7/git_moodle/moodle/lib/accesslib.php on line 2355 Call Stack # Time Memory Function Location 1 0.0008 94472 {main}( ) ../index.php:0 2 0.1863 6920552 bootstrap_renderer->header( ) ../index.php:89 3 0.1863 6921032 bootstrap_renderer->__call( ) ../setuplib.php:0 4 0.1882 7046888 call_user_func_array ( ) ../setuplib.php:1203 5 0.1882 7047392 core_renderer->header( ) ../setuplib.php:0 6 0.1882 7051344 moodle_page->set_state( ) ../outputrenderers.php:600 7 0.1882 7052344 moodle_page->starting_output( ) ../pagelib.php:702 8 0.1913 7118616 block_manager->process_url_actions( ) ../pagelib.php:1184 9 0.1915 7126632 block_manager->process_url_edit( ) ../blocklib.php:1040 10 0.2236 8623376 moodle_page->set_title( ) ../blocklib.php:1267 11 0.2236 8623752 format_string( ) ../pagelib.php:896 12 0.2238 8628232 performance_measuring_filter_manager->filter_string( ) ../weblib.php:1251 13 0.2238 8628688 filter_manager->filter_string( ) ../filterlib.php:305 14 0.2238 8629152 filter_manager->get_string_filters( ) ../filterlib.php:208 15 0.2238 8629712 filter_manager->load_filters( ) ../filterlib.php:180 16 0.2250 8635024 performance_measuring_filter_manager->make_filter_object( ) ../filterlib.php:106 17 0.2250 8635608 filter_manager->make_filter_object( ) ../filterlib.php:284 18 0.2251 8638320 legacy_filter->__construct( ) ../filterlib.php:141 19 0.2251 8638968 get_courseid_from_context( ) ../filterlib.php:393 20 0.2252 8643048 get_courseid_from_context( ) ../accesslib.php:2373 Notice: Trying to get property of non-object in /Users/stronk7/git_moodle/moodle/lib/accesslib.php on line 2359 Call Stack # Time Memory Function Location 1 0.0008 94472 {main}( ) ../index.php:0 2 0.1863 6920552 bootstrap_renderer->header( ) ../index.php:89 3 0.1863 6921032 bootstrap_renderer->__call( ) ../setuplib.php:0 4 0.1882 7046888 call_user_func_array ( ) ../setuplib.php:1203 5 0.1882 7047392 core_renderer->header( ) ../setuplib.php:0 6 0.1882 7051344 moodle_page->set_state( ) ../outputrenderers.php:600 7 0.1882 7052344 moodle_page->starting_output( ) ../pagelib.php:702 8 0.1913 7118616 block_manager->process_url_actions( ) ../pagelib.php:1184 9 0.1915 7126632 block_manager->process_url_edit( ) ../blocklib.php:1040 10 0.2236 8623376 moodle_page->set_title( ) ../blocklib.php:1267 11 0.2236 8623752 format_string( ) ../pagelib.php:896 12 0.2238 8628232 performance_measuring_filter_manager->filter_string( ) ../weblib.php:1251 13 0.2238 8628688 filter_manager->filter_string( ) ../filterlib.php:305 14 0.2238 8629152 filter_manager->get_string_filters( ) ../filterlib.php:208 15 0.2238 8629712 filter_manager->load_filters( ) ../filterlib.php:180 16 0.2250 8635024 performance_measuring_filter_manager->make_filter_object( ) ../filterlib.php:106 17 0.2250 8635608 filter_manager->make_filter_object( ) ../filterlib.php:284 18 0.2251 8638320 legacy_filter->__construct( ) ../filterlib.php:141 19 0.2251 8638968 get_courseid_from_context( ) ../filterlib.php:393 20 0.2252 8643048 get_courseid_from_context( ) ../accesslib.php:2373
        Hide
        Petr Škoda added a comment -

        Fix submitted for review, thanks a lot for the report!

        Petr

        Show
        Petr Škoda added a comment - Fix submitted for review, thanks a lot for the report! Petr

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: