- URL del foro: localhost
- Versión del foro: 1.6.x
- Actualización: 1.6.13
En uno de mis plugins estoy intentando que edite class_parser.php para añadir una opcion a MyBB, pero al usar este codigo en la funcion de activado del plugin con PluginLibrary. con todo definido:
Código:
global $PL;
$PL or require_once PLUGINLIBRARY;
$edits = array(
'search' => array('Codigo a buscar'),
'replace' => array(
'Codigo a insertar linea 1',
'¡Codigo a insertar linea 1',
),
);
return $PL->edit_core('google_seo', 'inc/class_parser.php', true, $edits);
}
Me da este error:
[spoiler]
Warning [2] Cannot use a scalar value as an array - Line: 831 - File: inc/plugins/pluginlibrary.php PHP 5.3.28 (Linux)
File Line Function
/inc/plugins/pluginlibrary.php 831 errorHandler->error
/inc/plugins/pluginlibrary.php 875 PluginLibrary->_dissect
/inc/plugins/pluginlibrary.php 981 PluginLibrary->_edit
/inc/plugins/nombre_plugin.php 408 PluginLibrary->edit_core
[PHP] nombre_plugin_activate
/admin/modules/config/plugins.php 401 call_user_func
/admin/index.php 572 require
Warning [2] Cannot use a scalar value as an array - Line: 839 - File: inc/plugins/pluginlibrary.php PHP 5.3.28 (Linux)
File Line Function
/inc/plugins/pluginlibrary.php 839 errorHandler->error
/inc/plugins/pluginlibrary.php 875 PluginLibrary->_dissect
/inc/plugins/pluginlibrary.php 981 PluginLibrary->_edit
/inc/plugins/nombre_plugin.php 408 PluginLibrary->edit_core
[PHP] nombre_plugin_activate
/admin/modules/config/plugins.php 401 call_user_func
/admin/index.php 572 require
Warning [2] Cannot use a scalar value as an array - Line: 839 - File: inc/plugins/pluginlibrary.php PHP 5.3.28 (Linux)
File Line Function
/inc/plugins/pluginlibrary.php 839 errorHandler->error
/inc/plugins/pluginlibrary.php 875 PluginLibrary->_dissect
/inc/plugins/pluginlibrary.php 981 PluginLibrary->_edit
/inc/plugins/nombre_plugin.php 408 PluginLibrary->edit_core
[PHP] nombre_plugin_activate
/admin/modules/config/plugins.php 401 call_user_func
/admin/index.php 572 require
Warning [2] Cannot use a scalar value as an array - Line: 844 - File: inc/plugins/pluginlibrary.php PHP 5.3.28 (Linux)
File Line Function
/inc/plugins/pluginlibrary.php 844 errorHandler->error
/inc/plugins/pluginlibrary.php 875 PluginLibrary->_dissect
/inc/plugins/pluginlibrary.php 981 PluginLibrary->_edit
/inc/plugins/nombre_plugin.php 408 PluginLibrary->edit_core
[PHP] nombre_plugin_activate
/admin/modules/config/plugins.php 401 call_user_func
/admin/index.php 572 require
Warning [2] Cannot use a scalar value as an array - Line: 845 - File: inc/plugins/pluginlibrary.php PHP 5.3.28 (Linux)
File Line Function
/inc/plugins/pluginlibrary.php 845 errorHandler->error
/inc/plugins/pluginlibrary.php 875 PluginLibrary->_dissect
/inc/plugins/pluginlibrary.php 981 PluginLibrary->_edit
/inc/plugins/nombre_plugin.php 408 PluginLibrary->edit_core
[PHP] nombre_plugin_activate
/admin/modules/config/plugins.php 401 call_user_func
/admin/index.php 572 require
[/spoiler]