Skip to content

Commit 7012e04

Browse files
authored
docs: Fixed typo (codeigniter4#9810)
* Fix typo in getVar() method documentation * Fix links to PHP filter documentation * Update filter flags links in incomingrequest.rst * Update filter documentation links in request.rst
1 parent 92100b2 commit 7012e04

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

user_guide_src/source/incoming/incomingrequest.rst

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ getVar()
161161
in new projects. Even if you are already using it, we recommend that you use
162162
another, more appropriate method.
163163

164-
The ``getVar()`` method will pull from ``$_REQUEST``, so will return any data from ``$_GET``, ``$POST``, or ``$_COOKIE`` (depending on php.ini `request-order <https://www.php.net/manual/en/ini.core.php#ini.request-order>`_).
164+
The ``getVar()`` method will pull from ``$_REQUEST``, so will return any data from ``$_GET``, ``$_POST``, or ``$_COOKIE`` (depending on php.ini `request-order <https://www.php.net/manual/en/ini.core.php#ini.request-order>`_).
165165

166166
.. warning:: If you want to validate POST data only, don't use ``getVar()``.
167167
Newer values override older values. POST values may be overridden by the
@@ -229,7 +229,7 @@ Filtering Input Data
229229
To maintain security of your application, you will want to filter all input as you access it. You can
230230
pass the type of filter to use as the second parameter of any of these methods. The native ``filter_var()``
231231
function is used for the filtering. Head over to the PHP manual for a list of `valid
232-
filter types <https://www.php.net/manual/en/filter.filters.php>`_.
232+
filter types <https://www.php.net/manual/en/filters.php>`_.
233233

234234
Filtering a POST variable would look like this:
235235

@@ -366,9 +366,9 @@ The methods provided by the parent classes that are available are:
366366
367367
:param string $index: The name of the variable/key to look for.
368368
:param int $filter: The type of filter to apply. A list of filters can be found in
369-
`Types of filters <https://www.php.net/manual/en/filter.filters.php>`__.
369+
`Types of filters <https://www.php.net/manual/en/filters.php>`__.
370370
:param int $flags: Flags to apply. A list of flags can be found in
371-
`Filter flags <https://www.php.net/manual/en/filter.filters.flags.php>`__.
371+
`Filter flags <https://www.php.net/manual/en/filter.constants.php#filter.constants.flags.generic>`__.
372372
:returns: ``$_REQUEST`` if no parameters supplied, otherwise the REQUEST value if found, or null if not
373373
:rtype: array|bool|float|int|object|string|null
374374

@@ -382,9 +382,9 @@ The methods provided by the parent classes that are available are:
382382
383383
:param string $index: The name of the variable/key to look for.
384384
:param int $filter: The type of filter to apply. A list of filters can be found in
385-
`Types of filters <https://www.php.net/manual/en/filter.filters.php>`__.
385+
`Types of filters <https://www.php.net/manual/en/filters.php>`__.
386386
:param int $flags: Flags to apply. A list of flags can be found in
387-
`Filter flags <https://www.php.net/manual/en/filter.filters.flags.php>`__.
387+
`Filter flags <https://www.php.net/manual/en/filter.constants.php#filter.constants.flags.generic>`__.
388388
:returns: ``$_GET`` if no parameters supplied, otherwise the GET value if found, or null if not
389389
:rtype: array|bool|float|int|object|string|null
390390

@@ -421,9 +421,9 @@ The methods provided by the parent classes that are available are:
421421
422422
:param string $index: The name of the variable/key to look for.
423423
:param int $filter: The type of filter to apply. A list of filters can be
424-
found `here <https://www.php.net/manual/en/filter.filters.php>`__.
424+
found `here <https://www.php.net/manual/en/filters.php>`__.
425425
:param int $flags: Flags to apply. A list of flags can be found
426-
`here <https://www.php.net/manual/en/filter.filters.flags.php>`__.
426+
`here <https://www.php.net/manual/en/filter.constants.php#filter.constants.flags.generic>`__.
427427
:returns: ``$_POST`` if no parameters supplied, otherwise the POST value if found, or null if not
428428
:rtype: array|bool|float|int|object|string|null
429429

@@ -433,9 +433,9 @@ The methods provided by the parent classes that are available are:
433433
434434
:param string $index: The name of the variable/key to look for.
435435
:param int $filter: The type of filter to apply. A list of filters can be found in
436-
`Types of filters <https://www.php.net/manual/en/filter.filters.php>`__.
436+
`Types of filters <https://www.php.net/manual/en/filters.php>`__.
437437
:param int $flags: Flags to apply. A list of flags can be found in
438-
`Filter flags <https://www.php.net/manual/en/filter.filters.flags.php>`__.
438+
`Filter flags <https://www.php.net/manual/en/filter.constants.php#filter.constants.flags.generic>`__.
439439
:returns: ``$_POST`` and ``$_GET`` combined if no parameters specified (prefer POST value on conflict),
440440
otherwise looks for POST value, if nothing found looks for GET value, if no value found returns null
441441
:rtype: array|bool|float|int|object|string|null
@@ -453,9 +453,9 @@ The methods provided by the parent classes that are available are:
453453
454454
:param string $index: The name of the variable/key to look for.
455455
:param int $filter: The type of filter to apply. A list of filters can be found in
456-
`Types of filters <https://www.php.net/manual/en/filter.filters.php>`__.
456+
`Types of filters <https://www.php.net/manual/en/filters.php>`__.
457457
:param int $flags: Flags to apply. A list of flags can be found in
458-
`Filter flags <https://www.php.net/manual/en/filter.filters.flags.php>`__.
458+
`Filter flags <https://www.php.net/manual/en/filter.constants.php#filter.constants.flags.generic>`__.
459459
:returns: ``$_GET`` and ``$_POST`` combined if no parameters specified (prefer GET value on conflict),
460460
otherwise looks for GET value, if nothing found looks for POST value, if no value found returns null
461461
:rtype: array|bool|float|int|object|string|null
@@ -473,9 +473,9 @@ The methods provided by the parent classes that are available are:
473473
474474
:param array|string|null $index: COOKIE name
475475
:param int $filter: The type of filter to apply. A list of filters can be found in
476-
`Types of filters <https://www.php.net/manual/en/filter.filters.php>`__.
476+
`Types of filters <https://www.php.net/manual/en/filters.php>`__.
477477
:param int $flags: Flags to apply. A list of flags can be found in
478-
`Filter flags <https://www.php.net/manual/en/filter.filters.flags.php>`__.
478+
`Filter flags <https://www.php.net/manual/en/filter.constants.php#filter.constants.flags.generic>`__.
479479
:returns: ``$_COOKIE`` if no parameters supplied, otherwise the COOKIE value if found or null if not
480480
:rtype: array|bool|float|int|object|string|null
481481

@@ -495,9 +495,9 @@ The methods provided by the parent classes that are available are:
495495
496496
:param array|string|null $index: Value name
497497
:param int $filter: The type of filter to apply. A list of filters can be found in
498-
`Types of filters <https://www.php.net/manual/en/filter.filters.php>`__.
498+
`Types of filters <https://www.php.net/manual/en/filters.php>`__.
499499
:param int $flags: Flags to apply. A list of flags can be found in
500-
`Filter flags <https://www.php.net/manual/en/filter.filters.flags.php>`__.
500+
`Filter flags <https://www.php.net/manual/en/filter.constants.php#filter.constants.flags.generic>`__.
501501
:returns: ``$_SERVER`` item value if found, null if not
502502
:rtype: array|bool|float|int|object|string|null
503503

user_guide_src/source/incoming/request.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ Class Reference
8686
.. php:method:: getServer([$index = null[, $filter = null[, $flags = null]]])
8787
8888
:param mixed $index: Value name
89-
:param int $filter: The type of filter to apply. A list of filters can be found in `PHP manual <https://www.php.net/manual/en/filter.filters.php>`__.
90-
:param int|array $flags: Flags to apply. A list of flags can be found in `PHP manual <https://www.php.net/manual/en/filter.filters.flags.php>`__.
89+
:param int $filter: The type of filter to apply. A list of filters can be found in `PHP manual <https://www.php.net/manual/en/filters.php>`__.
90+
:param int|array $flags: Flags to apply. A list of flags can be found in `PHP manual <https://www.php.net/manual/en/filter.constants.php#filter.constants.flags.generic>`__.
9191
:returns: ``$_SERVER`` item value if found, null if not
9292
:rtype: mixed
9393

@@ -107,8 +107,8 @@ Class Reference
107107
:php:func:`env()` instead.
108108

109109
:param mixed $index: Value name
110-
:param int $filter: The type of filter to apply. A list of filters can be found in `PHP manual <https://www.php.net/manual/en/filter.filters.php>`__.
111-
:param int|array $flags: Flags to apply. A list of flags can be found in `PHP manual <https://www.php.net/manual/en/filter.filters.flags.php>`__.
110+
:param int $filter: The type of filter to apply. A list of filters can be found in `PHP manual <https://www.php.net/manual/en/filters.php>`__.
111+
:param int|array $flags: Flags to apply. A list of flags can be found in `PHP manual <https://www.php.net/manual/en/filter.constants.php#filter.constants.flags.generic>`__.
112112
:returns: ``$_ENV`` item value if found, null if not
113113
:rtype: mixed
114114

@@ -135,8 +135,8 @@ Class Reference
135135
136136
:param string $method: Input filter constant
137137
:param mixed $index: Value name
138-
:param int $filter: The type of filter to apply. A list of filters can be found in `PHP manual <https://www.php.net/manual/en/filter.filters.php>`__.
139-
:param int|array $flags: Flags to apply. A list of flags can be found in `PHP manual <https://www.php.net/manual/en/filter.filters.flags.php>`__.
138+
:param int $filter: The type of filter to apply. A list of filters can be found in `PHP manual <https://www.php.net/manual/en/filters.php>`__.
139+
:param int|array $flags: Flags to apply. A list of flags can be found in `PHP manual <https://www.php.net/manual/en/filter.constants.php#filter.constants.flags.generic>`__.
140140
:rtype: mixed
141141

142142
Fetches one or more items from a global, like cookies, get, post, etc.

0 commit comments

Comments
 (0)