Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions plugins/system/languagecode/languagecode.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,8 @@ public function onAfterRender()
*
* @since 2.5
*/
public function onContentPrepareForm($form, $data)
public function onContentPrepareForm(JForm $form, $data)
{
// Check we have a form.
if (!($form instanceof JForm))
{
$this->_subject->setError('JERROR_NOT_A_FORM');

return false;
}

// Check we are manipulating the languagecode plugin.
if ($form->getName() !== 'com_plugins.plugin' || !$form->getField('languagecodeplugin', 'params'))
{
Expand Down
9 changes: 1 addition & 8 deletions plugins/user/profile/profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,8 @@ public static function tos($value)
*
* @since 1.6
*/
public function onContentPrepareForm($form, $data)
public function onContentPrepareForm(JForm $form, $data)
{
if (!($form instanceof JForm))
{
$this->_subject->setError('JERROR_NOT_A_FORM');

return false;
}

// Check we are manipulating a valid form.
$name = $form->getName();

Expand Down