JREQUEST-MEMBERS-001

JRequest::getInt()

JRequest::getInt / getCmd / getWord / get / set / getMethod

The entire JRequest API died with the class. People search getInt even when they already know getVar is dead.

JRequest::getInt()$app->getInput()->get('x', 0, 'INT')

Dies at Joomla 3 → 4J3: Works nativelyJ4: Removed — fatalJ6: Removed — fatalBC plugin: no — already dead on J4Patch possible — review itJoomla API

What you will see

  • Call to undefined method JRequest::getInt
  • Call to undefined method JRequest::getCmd
  • Call to undefined method JRequest::getWord
  • Call to undefined method JRequest::getMethod
  • Call to undefined method JRequest::setVar

Symptoms people search

getInt not found · getCmd · getWord · JRequest::get(

Replace this code

Swap JRequest::getInt() for $app->getInput()->get('x', 0, 'INT').

Joomla 3

Remove or stop calling this

$id = JRequest::getInt('id');
$task = JRequest::getCmd('task');
$word = JRequest::getWord('layout');
$all = JRequest::get('post');
JRequest::setVar('id', 1);
$method = JRequest::getMethod();

Joomla 4 / 6

Use this instead

$input = Factory::getApplication()->getInput();
$id = $input->getInt('id');
$task = $input->getCmd('task');
$word = $input->getWord('layout');
$post = $input->post->getArray();
$input->set('id', 1);
$method = $input->getMethod();

How to fix it

  1. 1Same as JRequest::getVar: use Input.
  2. 2Map getInt→getInt, getCmd→getCmd, getWord→getWord.

Also known as

getInt · getCmd · getWord · getFloat · getBool · getString · setVar · getMethod · JRequest::get

Related issues

Get in touch

Have a project in mind? Let's talk about it.

Tell us what you're building. Whether it's a new site, an online store, a mobile app, or something that needs AI under the hood, we'll get back to you within a business day.

Free consultation
No commitment, no pressure
Reply within 24 hours
Usually much faster

Prefer a direct conversation?

Request a project quote

Tell us about your project

Fill out the quick form and we'll reach out.