Jump to content

lowercase call to Request::setCookie


TSP

Recommended Posts

Hi, 

In applications/core/modules/admin/languages/languages.php you have two calls like this (line 305) 

            foreach ( array( 'vle_editor', 'vle_keys' ) as $k )
            {
                if ( $values[ 'lang_' . $k ] )
                {
                    \IPS\Request::i()->setcookie( $k, 1 );
                }
                elseif ( isset( \IPS\Request::i()->cookie[ $k ] ) )
                {
                    \IPS\Request::i()->setcookie( $k, 0 );
                }
            }

 Unless I'm missing something, it should be \IPS\Request::i()->setCookie with a big C instead of a small one. 

 

Link to comment
Share on other sites

19 hours ago, Daniel F said:

Thanks, while it's not really a bug because PHP method names are case-insensitive, it's indeed better to use the proper name:D.  I have fixed that for an upcoming release.

I wasn't actually sure and didn't test if it caused any issues. I did guess that since the code was in a area that probably haven't been touched for a while, that it wouldn't matter. But the perfectionist in me still wanted to report it 😛

I just stumbled across it as I was investigating a fix for samesite-cookies. On that note... Do you know if you plan to do any changes to add support for deciding the samesite-attribute for cookies?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...