Home » Forum
NoNumber!

Joomla!® Websites & Extensions
development  -  support  -  consultancy

I try to respond within 48 hours (excluding weekends).
If I haven't responded by then, feel free to post a reminder or bug me via email.

My last reply was: 15 Hours, 36 Minutes ago.

Welcome, Guest
Please Login or Register.    Lost Password?

[SOLVED] Warning: in_array() [function.in-array] Wrong datatype for second argument
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: [SOLVED] Warning: in_array() [function.in-array] Wrong datatype for second argument
#28
[SOLVED] Warning: in_array() [function.in-array] Wrong datatype for second argument 3 Years, 7 Months ago  
Hi,

I'm looking at using sourcerer to migrate my site over to Joomla and gradually write my own modules in Joomla later. It seems to work well but I get a warning message appearing:

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/site.com/plugins/system/sourcerer.php on line 224

Any ideas why this warning message always shows?

Thanks
David
David
Posts: 4
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#31
[SOLVED] Warning: in_array() [function.in-array] Wrong datatype for second argument 3 Years, 7 Months ago  
Yes, I have an idea... it's because there is a bug in Sourcerer!
I'll release a new version soon. In the meantime, you can change lines 224 - 227 of sourcerer.php to:
if ( !in_array( $option, $this->params['areas']['components']['components']
) ) {
    // For all components that are not selected, set the 'enable' to false
    $this->params['areas']['components']['enable'] = $this->params['areas']['compone
nts']['enable_css'] = $this->params['areas']['components']['enable_js'] = $this->par
a
ms['areas']['components']['enable_php'] = 0;
}

Peter van Westen
Admin
Posts: 9169
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#32
[SOLVED] Warning: in_array() [function.in-array] Wrong datatype for second argument 3 Years, 7 Months ago  
The new fixed release can be downloaded from:
http://joomlacode.org/gf/project/sourcerer/frs/
Peter van Westen
Admin
Posts: 9169
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#59
[SOLVED] Warning: in_array() [function.in-array] Wrong datatype for second argument 3 Years, 7 Months ago  
Sorry I still get the same error with version 1.4 of the pluggin.

Any ideas?

Thanks
David
Posts: 4
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#60
[SOLVED] Warning: in_array() [function.in-array] Wrong datatype for second argument 3 Years, 7 Months ago  
That's strange. Is it exactly the same error?
Have you tried uninstalling and installing the plugin?
Where do you get the error? All pages?
What are your 'Security Settings for Components' for the Sourcerer! plugin?
Peter van Westen
Admin
Posts: 9169
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#61
[SOLVED] Warning: in_array() [function.in-array] Wrong datatype for second argument 3 Years, 7 Months ago  
Yes it is exactly the same error.

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/site.com/plugins/system/sourcerer.php on line 224

I am doing the following:

Adding the following code:
{source}
<?php
echo('This text is placed through <b>PHP</b>!');
?>
{/source}

to any component.

For example in the "Miscellaneous Information:" for a contact (default component in Joomla). e.g http://demo.joomla.org/1.5/index.php?option=com_contact&view=contact&id=1:name&catid= 12:contacts

I get the same error with my own custom components when trying to use sourcerer but the contact component is a good example using the default Joomla 1.5 install.

Under Advanced Parameters>Security Settings for Components I have yes selected and enable only in check box ticked for everyhting (including contacts).

Do you need any other information?
David
Posts: 4
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#62
[SOLVED] Warning: in_array() [function.in-array] Wrong datatype for second argument 3 Years, 7 Months ago  
Yes, I found what was going wrong. Stupid mistake in the code. It is fixed in the new release 0.1.5:
http://joomlacode.org/gf/project/sourcerer/frs/
Peter van Westen
Admin
Posts: 9169
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#66
[SOLVED] Warning: in_array() [function.in-array] Wrong datatype for second argument 3 Years, 7 Months ago  
Thakyou it now works with version 1.5

Love your work!
David
Posts: 4
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
Moderators: Peter van Westen
MaxCDN | Content Delivery Network | Accelerate your site to the max
hosting joomla
Open Source Training | Online Joomla! Training and Support