Skip to content

Conversation

@AllenJB
Copy link
Contributor

@AllenJB AllenJB commented Oct 11, 2025

Fixes #4873

Copy link
Member

@TimWolla TimWolla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Girgias might have markup opinions here?

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed I have some markup notes, the wrapping para is very much unnecessary and please use <simpara> and fix the above note at the same time :)

@AllenJB
Copy link
Contributor Author

AllenJB commented Nov 4, 2025

In this case fixing this instance would have created an inconsistency with the markup across rest of this file, so I've reviewed the whole file to make it consistent.

@AllenJB AllenJB requested a review from Girgias November 4, 2025 09:10
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, but going throught the file just brings to light more issues :/

Comment on lines +86 to +89
You may notice the <parameter>expires_or_options</parameter> parameter takes on a
Unix timestamp, as opposed to the date format <literal>Wdy, DD-Mon-YYYY
HH:MM:SS GMT</literal>, this is because PHP does this conversion
internally.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While at it could you rewrite this to get rid of the personalization (i.e. using "you") in accordance with the manual style guide.

</note>
<note>
<simpara>
If <literal>samesite</literal> is <literal>None</literal> then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe as it is a string?

Suggested change
If <literal>samesite</literal> is <literal>None</literal> then
If <literal>samesite</literal> is <literal>"None"</literal> then

Comment on lines -251 to +260
<para>
</programlisting>
</example>
<simpara>
Note that the value portion of the cookie will automatically be
urlencoded when you send the cookie, and when it is received, it
is automatically decoded and assigned to a variable by the same
name as the cookie name. If you don't want this, you can use
<function>setrawcookie</function> instead. To see
the contents of our test cookie in a script, simply use one of the
following examples:
</para>
<para>
<informalexample>
<programlisting role="php">
<![CDATA[
</simpara>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personalization, but also maybe this should also be in a <note> tag?

Comment on lines +262 to +263
<programlisting role="php">
<![CDATA[
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<programlisting role="php">
<![CDATA[
<programlisting role="php">
<![CDATA[

Comment on lines +277 to +279
When deleting a cookie you should assure that the expiration date
is in the past, to trigger the removal mechanism in your browser.
Examples follow how to delete cookies sent in previous example:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personalization

Comment on lines +281 to +282
<programlisting role="php">
<![CDATA[
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<programlisting role="php">
<![CDATA[
<programlisting role="php">
<![CDATA[

Comment on lines +294 to +298
You may also set array cookies by using array notation in the
cookie name. This has the effect of setting as many cookies as
you have array elements, but when the cookie is received by your
script, the values are all placed in an array with the cookie's
name:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personalization

Comment on lines 341 to 342
You can use output buffering to send output prior to the
call of this function, with the overhead of all of your output to the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personalization

Comment on lines +233 to +235
<simpara>
The following examples demonstrate some ways to send cookies.
<example>
<title><function>setcookie</function> send example</title>
<programlisting role="php">
<![CDATA[
</simpara>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this paragraph even useful?

<example>
<title><function>setcookie</function> send example</title>
<programlisting role="php">
<![CDATA[
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And quite a few other places do this

Suggested change
<![CDATA[
<![CDATA[

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

setcookie() 'samesite' option bugging

3 participants