Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errores encontrado en toba 3.4 #180

Open
eliasFacchini opened this issue Apr 18, 2024 · 1 comment
Open

Errores encontrado en toba 3.4 #180

eliasFacchini opened this issue Apr 18, 2024 · 1 comment
Assignees
Labels
Milestone

Comments

@eliasFacchini
Copy link

● Log error: "array_keys(): Argument #1 ($array) must be of type array, int given":**
• Path donde ocurre el error: /vendor/siu-toba/framework/php/nucleo/componentes/toba_componente.php
• Variable que da el error: $definicion
• Causado por: devolver un INT
• Corrección: asignarlo como array y agregar validación de tipo de datos en el construct
• Método corregido:
function __construct( $definicion = array() )
{
//--- Compatibilidad con el metodo anterior de mantener cosas en sesion
$this->definir_propiedades_sesion();
// Compatibilidad hacia atras en el ID
$this->_id[0] = $definicion['_info']['proyecto'];
$this->_id[1] = $definicion['_info']['objeto'];
if(is_array($definicion))
//Cargo las variables internas que forman la definicion
foreach (array_keys($definicion) as $parte) {
$this->_definicion_partes[] = $parte;
$this->$parte = $definicion[$parte];
}
$this->_solicitud = toba::solicitud();
$this->_log = toba::logger();
//Recibi datos por el CANAL?
$this->_canal = apex_hilo_qs_canal_obj . $this->_id[1];
$this->_canal_recibidos = toba::memoria()->get_parametro($this->_canal);
$this->id_ses_g = "obj" . $this->_id[1];
$this->id_ses_grec = "obj" . $this->_id[1] . "_rec";
if (! self::$_modo_memoria_compatible) {
$this->_id_ses_g .= $definicion['_const_instancia_numero'];
$this->_id_ses_grec .= $definicion['_const_instancia_numero'];
}
$this->set_controlador($this); //Hasta que nadie lo explicite, yo me controlo solo
//Manejo transparente de memoria
$this->cargar_memoria(); //RECUPERO Memoria sincronizada
$this->cargar_info_dependencias();
//$this->_log->debug("CONSTRUCCION: {$this->_info['clase']}({$this->_id[1]}): {$this->get_nombre()}", 'toba');
}

Mismo log error en el path: /vendor/siu-toba/framework/php/nucleo/componentes/persistencia/toba_datos_tabla.php
• Variable que da el error: protected $_info_columnas
• Causado por: devolver un INT
• Corrección: asignarlo como array: protected $_info_columnas = array();

● Log error: non-static method toba_modelo_catalogo::get_instalacion() cannot be called statically
• Causado en: todos los llamados al método get_instalacion()
• Path del error: /vendor/siu-toba/framework/php/modelo/toba_modelo_catalogo.php
• Corrección: agregar public static y retirar los $this
• Método corregido:
public static function get_instalacion( $manejador_interface = null )
{
if (! isset($manejador_interface)) {
$manejador_interface = new toba_mock_proceso_gui();
}
if ( ! isset( $instalacion ) ) {
$instalacion = new toba_modelo_instalacion();
}
$instalacion->set_manejador_interface( $manejador_interface );
if (isset($db)) {
$instalacion->set_conexion_externa($db);
}
return $instalacion;
}

@enfoqueNativo
Copy link
Contributor

@eliasFacchini esta complicado leer esto, necesito 1 de dos cosas aca:

  • Mejor formateo del mensaje
  • Un PR con los cambios

@enfoqueNativo enfoqueNativo self-assigned this Apr 22, 2024
@enfoqueNativo enfoqueNativo added this to the 3.4 milestone Apr 22, 2024
@enfoqueNativo enfoqueNativo linked a pull request Apr 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants